def test_paper_title_slug(self): """This tests the title_slug field of a `::class:Reference`.""" test_publication = Reference(title="Test Publication.") test_publication.save() self.assertEqual(test_publication.title_slug, "test-publication")
def test_full_pmcid(self): """This tests that a correct full PMCID can be generated for a `::class:Publication`.""" test_publication = Reference(title="Test Publication", pmcid="12345") test_publication.save() self.assertEqual(test_publication.full_pmcid(), "PMC12345")
def test_create_new_paper_minimum(self): """This test creates a `::class:Reference` with the required information only.""" test_publication = Reference(title="Test Publication.") test_publication.save() self.assertEqual(test_publication.pk, 2)
def test_paper_absolute_url(self): """This tests the title_slug field of a `::class:Reference`.""" test_publication = Reference(title="Test Publication", laboratory_paper=True) test_publication.get_absolute_url() test_publication.save() self.assertEqual(test_publication.get_absolute_url(), "/reference/test-publication/")
def test_paper_absolute_url(self): '''This tests the title_slug field of a `::class:Reference`.''' test_publication = Reference(title='Test Publication', laboratory_paper=True) test_publication.get_absolute_url() test_publication.save() self.assertEqual(test_publication.get_absolute_url(), "/reference/test-publication/")
def test_paper_title_slug(self): '''This tests the title_slug field of a `::class:Reference`.''' test_publication = Reference(title='Test Publication.') test_publication.save() self.assertEqual(test_publication.title_slug, "test-publication")
def test_create_new_paper_minimum(self): '''This test creates a `::class:Reference` with the required information only.''' test_publication = Reference(title='Test Publication.') test_publication.save() self.assertEqual(test_publication.pk, 2)
def test_full_pmcid(self): '''This tests that a correct full PMCID can be generated for a `::class:Publication`.''' test_publication = Reference(title="Test Publication", pmcid = "12345") test_publication.save() self.assertEqual(test_publication.full_pmcid(), 'PMC12345')