aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-12-09 15:46:05 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-12-09 15:50:38 -0800
commitf02aaf796fbe1ac6d9d03044b10356eba4b8a544 (patch)
treefde825723f6302e487a5bfb4b7ed90fde2bd5b74 /python/tests
parent7e2ecd9696ae17166ca6c6deeeb32c8130bbd18b (diff)
downloadfatcat-f02aaf796fbe1ac6d9d03044b10356eba4b8a544.tar.gz
fatcat-f02aaf796fbe1ac6d9d03044b10356eba4b8a544.zip
regression test for deleted entity history view
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/web_entity_views.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/python/tests/web_entity_views.py b/python/tests/web_entity_views.py
index c42661cb..23a2b33b 100644
--- a/python/tests/web_entity_views.py
+++ b/python/tests/web_entity_views.py
@@ -62,6 +62,31 @@ def test_entity_basics(app):
# TODO: redirects and deleted entities
+def test_web_deleted_release(app, api):
+ # specific regresion test for view of a deleted release
+
+ # create release
+ eg = quick_eg(api)
+ r1 = ReleaseEntity(
+ title="some title",
+ ext_ids=ReleaseExtIds(),
+ )
+ r1edit = api.create_release(eg.editgroup_id, r1)
+ api.accept_editgroup(eg.editgroup_id)
+
+ # delete
+ eg = quick_eg(api)
+ api.delete_release(eg.editgroup_id, r1edit.ident)
+ api.accept_editgroup(eg.editgroup_id)
+ r2 = api.get_release(r1edit.ident)
+ assert r2.state == "deleted"
+
+ rv = app.get('/release/{}'.format(r2.ident))
+ assert rv.status_code == 200
+ rv = app.get('/release/{}/metadata'.format(r2.ident))
+ assert rv.status_code == 200
+ rv = app.get('/release/{}/history'.format(r2.ident))
+ assert rv.status_code == 200
def test_lookups(app):