Skip to content

Commit

Permalink
rename share toc test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkcl committed Aug 2, 2023
1 parent ea64816 commit 5f2c9f9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions doajtest/unit/test_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from portality.util import url_for


def test_toc_uses_both_issns_when_available(app_test, url_name):
def _test_toc_uses_both_issns_when_available(app_test, url_name):
j = models.Journal(**JournalFixtureFactory.make_journal_source(in_doaj=True))
pissn = j.bibjson().first_pissn
eissn = j.bibjson().first_eissn
Expand All @@ -20,7 +20,7 @@ def test_toc_uses_both_issns_when_available(app_test, url_name):
assert eissn in response.data.decode()


def toc_correctly_uses_pissn(app_test, url_name):
def _test_toc_correctly_uses_pissn(app_test, url_name):
j = models.Journal(**JournalFixtureFactory.make_journal_source(in_doaj=True))
pissn = j.bibjson().first_pissn
# remove eissn
Expand All @@ -35,7 +35,7 @@ def toc_correctly_uses_pissn(app_test, url_name):
assert pissn in response.data.decode()


def toc_correctly_uses_eissn(app_test, url_name):
def _test_toc_correctly_uses_eissn(app_test, url_name):
j = models.Journal(**JournalFixtureFactory.make_journal_source(in_doaj=True))
eissn = j.bibjson().first_eissn
# remove pissn
Expand Down Expand Up @@ -131,21 +131,21 @@ def test_02_toc_requirements(self):
assert a.data['index']['date_toc_fv_month'] == a.data['index']['date'] == "1991-01-01T00:00:00Z"

def test_03_toc_uses_both_issns_when_available(self):
test_toc_uses_both_issns_when_available(self.app_test, 'doaj.toc')
_test_toc_uses_both_issns_when_available(self.app_test, 'doaj.toc')

def test_04_toc_correctly_uses_pissn(self):
toc_correctly_uses_pissn(self.app_test, 'doaj.toc')
_test_toc_correctly_uses_pissn(self.app_test, 'doaj.toc')

def test_05_toc_correctly_uses_eissn(self):
toc_correctly_uses_eissn(self.app_test, 'doaj.toc')
_test_toc_correctly_uses_eissn(self.app_test, 'doaj.toc')


class TestTOCArticles(DoajTestCase):
def test_03_toc_uses_both_issns_when_available(self):
test_toc_uses_both_issns_when_available(self.app_test, 'doaj.toc_articles')
_test_toc_uses_both_issns_when_available(self.app_test, 'doaj.toc_articles')

def test_04_toc_correctly_uses_pissn(self):
toc_correctly_uses_pissn(self.app_test, 'doaj.toc_articles')
_test_toc_correctly_uses_pissn(self.app_test, 'doaj.toc_articles')

def test_05_toc_correctly_uses_eissn(self):
toc_correctly_uses_eissn(self.app_test, 'doaj.toc_articles')
_test_toc_correctly_uses_eissn(self.app_test, 'doaj.toc_articles')

0 comments on commit 5f2c9f9

Please sign in to comment.