summaryrefslogtreecommitdiffstats
path: root/python/tests/api_releases.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-14 13:42:57 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-14 13:43:07 -0700
commitc01a4ba190cc18a8186545ebb55c35864676b538 (patch)
tree6ec59ce457bcaa50932f04c44fd781a53ae33c52 /python/tests/api_releases.py
parent3ee54189b665d37933b6108fb85b28bb823dac4a (diff)
downloadfatcat-c01a4ba190cc18a8186545ebb55c35864676b538.tar.gz
fatcat-c01a4ba190cc18a8186545ebb55c35864676b538.zip
python impl
Diffstat (limited to 'python/tests/api_releases.py')
-rw-r--r--python/tests/api_releases.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/python/tests/api_releases.py b/python/tests/api_releases.py
index 52a4a548..5965ae4e 100644
--- a/python/tests/api_releases.py
+++ b/python/tests/api_releases.py
@@ -25,7 +25,7 @@ def test_release(api):
withdrawn_status="withdrawn",
withdrawn_year=2017,
withdrawn_date="2017-04-10",
- ext_ids=ReleaseEntityExtIds(
+ ext_ids=ReleaseExtIds(
doi="10.5555/12345678",
pmid="12345",
pmcid="PMC4321",
@@ -59,11 +59,11 @@ def test_release(api):
],
refs=[],
abstracts=[
- ReleaseEntityAbstracts(
+ ReleaseAbstract(
content="this is some abstract",
mimetype="text/plain",
lang="en"),
- ReleaseEntityAbstracts(
+ ReleaseAbstract(
content="this is some other abstract",
mimetype="text/plain",
lang="de"),
@@ -177,27 +177,27 @@ def test_empty_fields(api):
r1 = ReleaseEntity(
title="something",
contribs=[ReleaseContrib(raw_name="somebody")],
- ext_ids=ReleaseEntityExtIds())
+ ext_ids=ReleaseExtIds())
r1edit = api.create_release(r1, editgroup_id=eg.editgroup_id)
with pytest.raises(fatcat_client.rest.ApiException):
- r2 = ReleaseEntity(title="", ext_ids=ReleaseEntityExtIds())
+ r2 = ReleaseEntity(title="", ext_ids=ReleaseExtIds())
api.create_release(r2, editgroup_id=eg.editgroup_id)
with pytest.raises(fatcat_client.rest.ApiException):
- r2 = ReleaseEntity(title="something", contribs=[ReleaseContrib(raw_name="")], ext_ids=ReleaseEntityExtIds())
+ r2 = ReleaseEntity(title="something", contribs=[ReleaseContrib(raw_name="")], ext_ids=ReleaseExtIds())
api.create_release(r2, editgroup_id=eg.editgroup_id)
def test_controlled_vocab(api):
eg = quick_eg(api)
- r1 = ReleaseEntity(title="something", release_type="journal-thingie", ext_ids=ReleaseEntityExtIds())
+ r1 = ReleaseEntity(title="something", release_type="journal-thingie", ext_ids=ReleaseExtIds())
with pytest.raises(fatcat_client.rest.ApiException):
api.create_release(r1, editgroup_id=eg.editgroup_id)
r1.release_type = "article"
api.create_release(r1, editgroup_id=eg.editgroup_id)
- r2 = ReleaseEntity(title="something elase", release_stage="pre-print", ext_ids=ReleaseEntityExtIds())
+ r2 = ReleaseEntity(title="something elase", release_stage="pre-print", ext_ids=ReleaseExtIds())
with pytest.raises(fatcat_client.rest.ApiException):
api.create_release(r2, editgroup_id=eg.editgroup_id)
r2.release_stage = "published"