Commit 1cb23945 authored by Nathan Graule's avatar Nathan Graule 💻
Browse files

Check value is None on the realworld test case

parent 464c9e3f
...@@ -69,8 +69,6 @@ class TestCall(unittest.TestCase): ...@@ -69,8 +69,6 @@ class TestCall(unittest.TestCase):
def test_realworld_example(self): def test_realworld_example(self):
def cb(res, rej): def cb(res, rej):
with open(os.path.join(os.path.dirname(__file__), 'data.json')) as f: with open(os.path.join(os.path.dirname(__file__), 'data.json')) as f:
if not f.readable():
rej('File not readable')
res(f.read()) res(f.read())
call = Call(cb) \ call = Call(cb) \
...@@ -83,7 +81,7 @@ class TestCall(unittest.TestCase): ...@@ -83,7 +81,7 @@ class TestCall(unittest.TestCase):
except Exception as e: except Exception as e:
self.fail('Call.wait shouldn\'t throw as it is being caught') self.fail('Call.wait shouldn\'t throw as it is being caught')
self.assertNotEqual(value, 'org.sindresorhus.Caprine') self.assertIsNone(value)
self.assertTrue(isinstance(value, Exception)) self.assertTrue(isinstance(value, Exception))
def test_all(self): def test_all(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment