Esempio n. 1
0
class RegisterModelTest(TestCase):
    def setUp(self):
        self.obj = Register(name='Raffael Tancman', email='*****@*****.**')
        self.obj.save()

    def test_create(self):
        self.assertTrue(Register.objects.exists())

    def test_created_at(self):
        self.assertIsInstance(self.obj.created_at, datetime)
Esempio n. 2
0
class RegisterModelTest(TestCase):
    def setUp(self):
        self.obj = Register(
            name= 'Raffael Tancman',
            email='*****@*****.**'
        )
        self.obj.save()

    def test_create(self):
        self.assertTrue(Register.objects.exists())

    def test_created_at(self):
        self.assertIsInstance(self.obj.created_at, datetime)
Esempio n. 3
0
 def setUp(self):
     self.obj = Register(
         name= 'Raffael Tancman',
         email='*****@*****.**'
     )
     self.obj.save()
Esempio n. 4
0
 def setUp(self):
     self.obj = Register(name='Raffael Tancman', email='*****@*****.**')
     self.obj.save()