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