def test_unicode_with_id(self): user_book = UserBookFactory.create() self.assertEqual(unicode(user_book), u'Book {0}'.format(user_book.id))
def test_unicode_without_id(self): user_book = UserBookFactory.build() self.assertEqual(unicode(user_book), u'Unregistered book')
def setUp(self): self.client = Client() self.userbook = UserBookFactory.create()