We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4413592 commit a1dd115Copy full SHA for a1dd115
graphql/execution/tests/test_resolve.py
@@ -8,20 +8,7 @@
8
GraphQLObjectType, GraphQLSchema, GraphQLString)
9
from promise import Promise
10
11
-class CustomPromise(object):
12
- def __init__(self, fn=None, promise=None):
13
- self._promise = promise or Promise(fn)
14
-
15
- def get(self, _=None):
16
- raise NotImplementedError("Blocking for results not allowed. Use 'then' if you want to "
17
- "work with the result.")
18
19
- def then(self, success=None, failure=None):
20
- return self.__class__(promise=self._promise.then(success, failure))
21
22
- def __getattr__(self, item):
23
- return getattr(self._promise, item)
24
+class CustomPromise(Promise):
25
@classmethod
26
def fulfilled(cls, x):
27
p = cls()
0 commit comments