Skip to content

Commit debfa0d

Browse files
authored
Merge pull request #2334 from davidlowryduda/citation_test
Citation test
2 parents 9688c29 + fdbd34d commit debfa0d

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

lmfdb/test_citations.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# -*- coding: utf-8 -*-
2+
from lmfdb.base import LmfdbTest
3+
4+
5+
class CitationTest(LmfdbTest):
6+
'''
7+
Test that the citations page exists and the associated bib page exists
8+
'''
9+
10+
def test_citation_root(self):
11+
'''
12+
Checking /citation page
13+
'''
14+
r = self.tc.get('/citation')
15+
assert "A list of articles which cite the LMFDB" in r.data
16+
17+
def test_how_to_cite(self):
18+
'''
19+
Checking "How to Cite" /citation/citing
20+
'''
21+
r = self.tc.get('/citation/citing')
22+
assert "The BibTeX entry is" in r.data
23+
assert "To cite a specific page in the LMFDB" in r.data
24+
25+
def test_citation_specific(self):
26+
'''
27+
Checking that a known citation appears in /citation/citations list
28+
'''
29+
r = self.tc.get('/citation/citations')
30+
assert "Thomas A Hulse" in r.data
31+
assert "Counting square discriminants" in r.data
32+
33+
def test_cite_bib(self):
34+
'''
35+
Checking that a known bib is in /citation/citations_bib bibliography
36+
'''
37+
r = self.tc.get('/citation/citations_bib')
38+
assert "Hulse, Thomas A" in r.data
39+
assert "Counting square discriminants" in r.data

0 commit comments

Comments
 (0)