Exemple #1
0
 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")
Exemple #2
0
 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")
Exemple #3
0
 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)
Exemple #4
0
 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/")
Exemple #5
0
 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/") 
Exemple #6
0
 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")  
Exemple #7
0
 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)
Exemple #8
0
 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')