summaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/web_citation_csl.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/python/tests/web_citation_csl.py b/python/tests/web_citation_csl.py
new file mode 100644
index 00000000..1b6f34e1
--- /dev/null
+++ b/python/tests/web_citation_csl.py
@@ -0,0 +1,26 @@
+
+
+import json
+import tempfile
+import pytest
+from fatcat_client.rest import ApiException
+from fixtures import *
+
+
+def test_release_bibtex(app):
+
+ # "realistic" demo entity
+ rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaam')
+ assert rv.status_code == 200
+ assert b'BibTeX' in rv.data
+ rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaam.bib')
+ assert rv.status_code == 200
+ assert b'@article{' in rv.data
+
+ # "dummy" demo entity
+ rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai')
+ assert rv.status_code == 200
+ assert not b'BibTeX' in rv.data
+ with pytest.raises(ValueError):
+ rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai.bib')
+