Beispiel #1
0
 def test_create_new_commentary_all(self):
     '''This test creates a :class:`~papers.models.Commentary` with all fields entered.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
         comments = "Some comments",
         author = Person.objects.get(pk=1),
         citation = "some citation")
     test_commentary.save()
     self.assertEqual(test_commentary.pk, 1) 
Beispiel #2
0
 def test_create_new_commentary_all(self):
     '''This test creates a :class:`~papers.models.Commentary` with all fields entered.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
         comments = "Some comments",
         author = Person.objects.get(pk=1),
         citation = "some citation")
     test_commentary.save()
     self.assertEqual(test_commentary.pk, 1) 
Beispiel #3
0
 def test_commentary_unicode(self):
     '''This test creates a :class:`~papers.models.Commentary` and then verifies the unicode representation is correct.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
                                  comments="Some comments")
     test_commentary.save()
     self.assertEqual(
         test_commentary.__unicode__(),
         "Journal club summary on 14-3-3 proteins: a number of functions for a numbered protein."
     )
Beispiel #4
0
 def test_commentary_unicode(self):
     '''This test creates a :class:`~papers.models.Commentary` and then verifies the unicode representation is correct.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
         comments = "Some comments")
     test_commentary.save()
     self.assertEqual(test_commentary.__unicode__(), "Journal club summary on 14-3-3 proteins: a number of functions for a numbered protein.")                        
Beispiel #5
0
 def test_create_new_commentary_minimum(self):
     '''This test creates a :class:`~papers.models.Commentary` with the required information only.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
         comments = "Some comments")
     test_commentary.save()
     self.assertEqual(test_commentary.pk, 1) 
Beispiel #6
0
 def test_create_new_commentary_minimum(self):
     '''This test creates a :class:`~papers.models.Commentary` with the required information only.'''
     test_commentary = Commentary(paper=Publication.objects.get(pk=1),
         comments = "Some comments")
     test_commentary.save()
     self.assertEqual(test_commentary.pk, 1)