diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-04 12:24:46 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-04 12:24:46 -0700 |
commit | 7d90315279d02b0d02d566a2b84231986bc43e59 (patch) | |
tree | c384d89c6445946cbe4e4f6b16c08955610652e4 /python/tests/web_citation_csl.py | |
parent | 8409128c47a287ccdf4d5092f094648495367e5a (diff) | |
download | fatcat-7d90315279d02b0d02d566a2b84231986bc43e59.tar.gz fatcat-7d90315279d02b0d02d566a2b84231986bc43e59.zip |
more citation styles, and tests
Diffstat (limited to 'python/tests/web_citation_csl.py')
-rw-r--r-- | python/tests/web_citation_csl.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/python/tests/web_citation_csl.py b/python/tests/web_citation_csl.py index 1b6f34e1..ae9bca55 100644 --- a/python/tests/web_citation_csl.py +++ b/python/tests/web_citation_csl.py @@ -1,5 +1,4 @@ - import json import tempfile import pytest @@ -16,6 +15,13 @@ def test_release_bibtex(app): rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaam.bib') assert rv.status_code == 200 assert b'@article{' in rv.data + rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaam/citeproc?style=csl-json') + assert rv.status_code == 200 + # could also rv.get_json() here + json.loads(rv.data.decode('utf-8')) + rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaam/citeproc?style=modern-language-association') + assert rv.status_code == 200 + assert rv.data.decode('utf-8').startswith('Ioannidis. “Why Most Published Research Findings Are False”. 2.8 (2005)') # "dummy" demo entity rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai') |