Exemple #1
0
 def test_create_new_authordetail_all(self):
     '''This test creates a :class:`~papers.models.AuthorDetails` with the required information only.'''
     test_authordetail = AuthorDetails(author=Person.objects.get(pk=1), 
         order = 1,
         corresponding_author = True,
         equal_contributors = True)
     test_authordetail.save()             
Exemple #2
0
 def test_create_new_authordetail_all(self):
     '''This test creates a :class:`~papers.models.AuthorDetails` with the required information only.'''
     test_authordetail = AuthorDetails(author=Person.objects.get(pk=1), 
         order = 1,
         corresponding_author = True,
         equal_contributors = True)
     test_authordetail.save()             
Exemple #3
0
 def test_authordetail_unicode(self):
     '''This tests that the unicode representaton of an :class:`~papers.models.AuthorDetails` object is correct.'''
     test_authordetail = AuthorDetails(author=Person.objects.get(pk=1),
                                       order=1,
                                       corresponding_author=True,
                                       equal_contributors=False)
     test_authordetail.save()
     self.assertEqual(test_authordetail.__unicode__(),
                      '1 - None -  Dave Bridges')
Exemple #4
0
 def test_authordetail_unicode(self):
     '''This tests that the unicode representaton of an :class:`~papers.models.AuthorDetails` object is correct.'''
     test_authordetail = AuthorDetails(author=Person.objects.get(pk=1), 
         order = 1, corresponding_author=True, equal_contributors=False)
     test_authordetail.save() 
     self.assertEqual(test_authordetail.__unicode__(), '1 - None -  Dave Bridges')