Пример #1
0
 def test_cep_str(self):
     cep = Cep(codigo='11111111')
     cep.save()
     self.assertEqual('11.111-111', str(cep))
Пример #2
0
 def test_sucessive_saves_increments_id(self):
     cep = Cep(codigo='11111111')
     cep.save()
     novo_cep = Cep(codigo='11111112')
     novo_cep.save()
     self.assertEqual(2, novo_cep.id)
Пример #3
0
 def test_can_isntantiate(self):
     cep = Cep(codigo='11111111')
     cep.save()
     self.assertIsInstance(cep, Cep)
Пример #4
0
 def test_cep_str(self):
     cep = Cep(codigo='11111111')
     cep.save()
     self.assertEqual('11.111-111', str(cep))
Пример #5
0
 def test_sucessive_saves_increments_id(self):
     cep = Cep(codigo='11111111')
     cep.save()
     novo_cep = Cep(codigo='11111112')
     novo_cep.save()
     self.assertEqual(2, novo_cep.id)
Пример #6
0
 def test_can_isntantiate(self):
     cep = Cep(codigo='11111111')
     cep.save()
     self.assertIsInstance(cep, Cep)