summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-04-04 18:17:55 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-04-04 18:17:55 -0700
commit0240f792951444d6459e7621f43f0fc892599402 (patch)
tree47466d2b4efda56dc8e6eac5b50770e7414582d7
parent60d7a0cdff7d41cf897373feba784a1dd2136450 (diff)
downloadfatcat-0240f792951444d6459e7621f43f0fc892599402.tar.gz
fatcat-0240f792951444d6459e7621f43f0fc892599402.zip
test already-merged editgroup_id (via web form)
-rw-r--r--python/tests/web_entity_views.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/python/tests/web_entity_views.py b/python/tests/web_entity_views.py
index 263a4652..1f22a803 100644
--- a/python/tests/web_entity_views.py
+++ b/python/tests/web_entity_views.py
@@ -240,7 +240,7 @@ def test_web_release_login(full_app, app_admin):
# creation (via form)
with full_app.test_request_context():
- form= ReleaseEntityForm()
+ form = ReleaseEntityForm()
form.title.data = "My Research: Missing Some Stuff"
rv = app_admin.post('/release/create', data=form.data, follow_redirects=True)
assert rv.status_code == 400
@@ -255,9 +255,21 @@ def test_web_release_login(full_app, app_admin):
rv = app_admin.post('/release/create', data=form.data, follow_redirects=True)
assert rv.status_code == 200
+ with full_app.test_request_context():
+ form = ReleaseEntityForm()
+ # these fields are required
+ form.title.data = "Creating Releases: A Review"
+ form.release_type.data = "article-journal"
+ form.release_status.data = "draft"
+ # already merged editgroup
+ form.editgroup_id.data = "aaaaaaaaaaaabo53aaaaaaaaae"
+ rv = app_admin.post('/release/create', data=form.data, follow_redirects=True)
+ assert rv.status_code == 400
+ assert b"already merged" in rv.data
+
# editing
with full_app.test_request_context():
- form= ReleaseEntityForm()
+ form = ReleaseEntityForm()
form.title.data = "My Research: Missing Some Stuff"
form.release_type.data = "bogus-release-type"
rv = app_admin.post('/release/create', data=form.data, follow_redirects=True)