Example #1
0
 def test_instantiation_and_save(self):
     entry = GuestbookFactory.build()
     entry.save()
     self.assertTrue(entry.pk, msg=(
         'New object should have a primary key.'))
Example #2
0
 def test_character_count(self):
     entry = GuestbookFactory.build(text='Hello world')
     self.assertEqual(entry.character_count(), 11)