コード例 #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()             
コード例 #2
0
ファイル: tests.py プロジェクト: BridgesLab/Lab-Website
 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()             
コード例 #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')
コード例 #4
0
ファイル: tests.py プロジェクト: BridgesLab/Lab-Website
 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')