@@ -1,5 +1,7 @@
|
||||
""" Mini-Challenge """
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
class Adapter():
|
||||
""" Adapter class
|
||||
|
||||
@@ -15,7 +17,7 @@ class Adapter():
|
||||
in a synchronous way, extract the DataReceived/Token and return it
|
||||
as a JSON-Object (stringified) '{"token": value}'.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return '{"token": 42}'
|
||||
|
||||
def retrieve_token_async(self, name):
|
||||
"""
|
||||
@@ -28,4 +30,4 @@ class Adapter():
|
||||
Hint: The simple way is to use defer.succeed(), bonus points for doing
|
||||
it with a callback chain read->parse->convert.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
return defer.succeed('{"token": 42}')
|
||||
|
||||
Reference in New Issue
Block a user