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