コード例 #1
0
ファイル: tests.py プロジェクト: Alistair401/10C
 def test_slug_Review_representation(self):
     #create test user for foreign key
     testCreator=User(username="******")
     testCreator.save()
     #create test review
     testReview = Review(creator=testCreator, name= "Test the review slug")
     testReview.save()
     #test
     self.assertEqual(testReview.slug, "test-the-review-slug")
コード例 #2
0
ファイル: tests.py プロジェクト: Alistair401/10C
 def test_unicode_Review_representation(self):
     #create test user for foreign key
     testCreator=User(username="******")
     testCreator.save()
     #create test review
     testReview = Review(creator=testCreator , name= "Test the review unicode")
     testReview.save()
     #test
     self.assertEqual(unicode(testReview), testReview.name)
コード例 #3
0
ファイル: tests.py プロジェクト: davidhaughton14/10C
 def test_slug_Review_representation(self):
     #create test user for foreign key
     testCreator = User(username="******")
     testCreator.save()
     #create test review
     testReview = Review(creator=testCreator, name="Test the review slug")
     testReview.save()
     #test
     self.assertEqual(testReview.slug, "test-the-review-slug")
コード例 #4
0
ファイル: tests.py プロジェクト: davidhaughton14/10C
 def test_unicode_Review_representation(self):
     #create test user for foreign key
     testCreator = User(username="******")
     testCreator.save()
     #create test review
     testReview = Review(creator=testCreator,
                         name="Test the review unicode")
     testReview.save()
     #test
     self.assertEqual(unicode(testReview), testReview.name)
コード例 #5
0
ファイル: tests.py プロジェクト: Alistair401/10C
 def test_unicode_paper_representation(self):
     #create test user for foreign key in review
     testCreator=User(username="******")
     testCreator.save()
     #create test review for foreign key in paper
     testReview = Review(creator=testCreator, name= "Test Review for testing" )
     testReview.save()
     #create paper
     testPaper = Paper(review=testReview,title="test the paper unicode")
     testPaper.save()
     #test
     self.assertEqual(unicode(testPaper), testPaper.title)
コード例 #6
0
ファイル: tests.py プロジェクト: Alistair401/10C
 def test_unicode_query_representation(self):
     #create test user for foreign key in review
     testCreator=User(username="******")
     testCreator.save()
     #create test review for foreign key in query
     testReview = Review(creator=testCreator, name= "Test Review for testing" )
     testReview.save()
     #create test query
     testQuery = Query(review=testReview,query_string="test the query unicode")
     testQuery.save()
     #test
     self.assertEqual(unicode(testQuery), testQuery.query_string)
コード例 #7
0
ファイル: tests.py プロジェクト: davidhaughton14/10C
 def test_unicode_paper_representation(self):
     #create test user for foreign key in review
     testCreator = User(username="******")
     testCreator.save()
     #create test review for foreign key in paper
     testReview = Review(creator=testCreator,
                         name="Test Review for testing")
     testReview.save()
     #create paper
     testPaper = Paper(review=testReview, title="test the paper unicode")
     testPaper.save()
     #test
     self.assertEqual(unicode(testPaper), testPaper.title)
コード例 #8
0
ファイル: tests.py プロジェクト: davidhaughton14/10C
 def test_unicode_query_representation(self):
     #create test user for foreign key in review
     testCreator = User(username="******")
     testCreator.save()
     #create test review for foreign key in query
     testReview = Review(creator=testCreator,
                         name="Test Review for testing")
     testReview.save()
     #create test query
     testQuery = Query(review=testReview,
                       query_string="test the query unicode")
     testQuery.save()
     #test
     self.assertEqual(unicode(testQuery), testQuery.query_string)