aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-20 18:20:58 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-20 18:20:58 -0700
commitb53180fa0d283feca9e14a69437e7eaf1c0d96a4 (patch)
treeabdd3aa87d6fdbda51e8edf5dd6d7d4ff4aaec26 /python/tests
parentcd829eedb5bfc7328ab5266650a625a6c88db6fa (diff)
downloadfatcat-b53180fa0d283feca9e14a69437e7eaf1c0d96a4.tar.gz
fatcat-b53180fa0d283feca9e14a69437e7eaf1c0d96a4.zip
basic controlled vocabulary for withdrawn_stage
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/api_releases.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/tests/api_releases.py b/python/tests/api_releases.py
index c0c4ef90..f2a370c3 100644
--- a/python/tests/api_releases.py
+++ b/python/tests/api_releases.py
@@ -199,9 +199,15 @@ def test_controlled_vocab(api):
r1.release_type = "article"
api.create_release(eg.editgroup_id, r1)
- r2 = ReleaseEntity(title="something elase", release_stage="pre-print", ext_ids=ReleaseExtIds())
+ r2 = ReleaseEntity(title="something else", release_stage="pre-print", ext_ids=ReleaseExtIds())
with pytest.raises(fatcat_client.rest.ApiException):
api.create_release(eg.editgroup_id, r2)
r2.release_stage = "published"
api.create_release(eg.editgroup_id, r2)
+ r3 = ReleaseEntity(title="something else", withdrawn_status="boondogle", ext_ids=ReleaseExtIds())
+ with pytest.raises(fatcat_client.rest.ApiException):
+ api.create_release(eg.editgroup_id, r3)
+ r3.withdrawn_status = "spam"
+ api.create_release(eg.editgroup_id, r3)
+