aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin@archive.org>2020-09-29 10:19:30 +0000
committerMartin Czygan <martin@archive.org>2020-09-29 10:19:30 +0000
commitd0f4155bc430d193451472b6c22b6a15e00a5785 (patch)
tree279951c3c14a1d5bb196744e939b647dd15ca943 /python/tests
parent3112fcd6457e318069830d1af7ae6e9512f52f59 (diff)
parent897fb1921dc0fe9a7506cb7d0e648a17d26f3ee4 (diff)
downloadfatcat-d0f4155bc430d193451472b6c22b6a15e00a5785.tar.gz
fatcat-d0f4155bc430d193451472b6c22b6a15e00a5785.zip
Merge branch 'bnewbold-202009-polish' into 'master'
fatcat.wiki 2020-09 polish See merge request webgroup/fatcat!84
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/import_file_meta.py2
-rw-r--r--python/tests/web_entity_views.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/python/tests/import_file_meta.py b/python/tests/import_file_meta.py
index b59356b6..e6d1a59f 100644
--- a/python/tests/import_file_meta.py
+++ b/python/tests/import_file_meta.py
@@ -31,8 +31,6 @@ def test_file_meta_importer_basic(file_meta_importer):
))
api.accept_editgroup(eg.editgroup_id)
- last_index = file_meta_importer.api.get_changelog(limit=1)[0].index
-
with open('tests/files/example_file_meta.json', 'r') as f:
counts = JsonLinePusher(file_meta_importer, f).run()
diff --git a/python/tests/web_entity_views.py b/python/tests/web_entity_views.py
index 7b973ef2..4068a0c7 100644
--- a/python/tests/web_entity_views.py
+++ b/python/tests/web_entity_views.py
@@ -48,7 +48,7 @@ def test_entity_basics(app, mocker):
rv = app.get('/{}/rev/{}'.format(entity_type, revision))
assert rv.status_code == 200
rv = app.get('/{}/rev/{}_something'.format(entity_type, revision))
- assert rv.status_code == 400
+ assert rv.status_code == 404
rv = app.get('/{}/rev/{}/metadata'.format(entity_type, revision))
assert rv.status_code == 200
print('/editgroup/aaaaaaaaaaaabo53aaaaaaaaaq/{}/{}'.format(entity_type, ident))
@@ -59,11 +59,13 @@ def test_entity_basics(app, mocker):
# bad requests
rv = app.get('/{}/9999999999'.format(entity_type))
- assert rv.status_code == 400
+ assert rv.status_code == 404
rv = app.get('/{}/9999999999/history'.format(entity_type))
- assert rv.status_code == 400
+ assert rv.status_code == 404
rv = app.get('/{}/f1f046a3-45c9-ffff-ffff-ffffffffffff'.format(entity_type))
- assert rv.status_code == 400
+ assert rv.status_code == 404
+ rv = app.get('/{}/rev/f1f046a3-45c9-ffff-ffff-fffffffff'.format(entity_type))
+ assert rv.status_code == 404
rv = app.get('/{}/ccccccccccccccccccccccccca'.format(entity_type))
assert rv.status_code == 404