def testWritesEntry(self): routes.write_entry("tag") entry = Entry.objects.get(pk=1) self.assertEqual(entry.name, "tag")
def testAddsStringRatingToComment(self): routes.write_entry("tag", 'I', 'am', 'YESOCH') entry = Entry.objects.get(pk=1) self.assertEqual(entry.comment, 'I am YESOCH')
def testOnlyWritesIntegerRatings(self): routes.write_entry("tag", 'three') entry = Entry.objects.get(pk=1) self.assertEqual(entry.rating, None)
def testOnlyWritesCommentIfCommentExists(self): routes.write_entry("tag") entry = Entry.objects.get(pk=1) self.assertEqual(entry.comment, None)
def testWritesEntryComment(self): routes.write_entry("tag", '3', 'I', 'am', 'YESOCH') entry = Entry.objects.get(pk=1) self.assertEqual(entry.comment, 'I am YESOCH')
def testWritesEntryRating(self): routes.write_entry("tag", '3') entry = Entry.objects.get(pk=1) self.assertEqual(entry.rating, 3)