示例#1
0
class CharacterTest(TestCase):
    def setUp(self):
        self.obj =  Character(
            name='Zezinho',
            PM=16,
            descricao='O Pedreiro')

    def test_create(self):
        'Subscription must have name,PM, descrição'
        self.obj.save()
        self.assertEqual(1, self.obj.id)

    def test_unicode(self):
        self.assertEqual(u'Bola de Fogo', unicode(self.obj))
示例#2
0
 def setUp(self):
     self.obj =  Character(
         name='Zezinho',
         PM=16,
         descricao='O Pedreiro')