diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-11 16:59:22 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-11 16:59:22 -0700 |
commit | 8e670a0aa2e1d61145a38b9f915b6fdd67429c47 (patch) | |
tree | 106ae561784e4efef29f68f080a08bae44386f12 /tests/test_backend.py | |
parent | 4b521b5eb0eb0843e365ac063cb04706d1cb674a (diff) | |
download | fatcat-8e670a0aa2e1d61145a38b9f915b6fdd67429c47.tar.gz fatcat-8e670a0aa2e1d61145a38b9f915b6fdd67429c47.zip |
fix examples/tests
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r-- | tests/test_backend.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py index 23016e09..345c8a95 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -14,9 +14,9 @@ import tempfile def check_entity_fields(e): for key in ('id', 'rev', 'previous', 'state', 'redirect_id', 'edit_id', 'extra_json'): - assert_in(key, e) + assert key in e for key in ('id', 'rev'): - assert_is_not_none(e[key]) + assert e[key] is not None ## API Tests ################################################################ @@ -41,17 +41,17 @@ class FatcatTestCase(unittest.TestCase): # Missing Id (TODO) #rv = self.app.get('/v0/work/rzga5b9cd7efgh04iljk') - #assert rv.status is 404 + #assert rv.status == 404 - return pytest.skip("need to put first") + # Valid Id (TODO) + #rv = self.app.get('/v0/work/r3zga5b9cd7ef8gh084714iljk') + #assert rv.status_code == 200 - # Valid Id - rv = self.app.get('/v0/work/r3zga5b9cd7ef8gh084714iljk') - assert rv.status_code == 200 + rv = self.app.get('/v0/work/random') obj = json.loads(rv.data.decode('utf-8')) check_entity_fields(obj) assert obj['title'] - assert_equal(obj['work_type'], "journal-article") + assert obj['work_type'] == "journal-article" def test_something(self): |