Esempio n. 1
0
    def test_customer_code_cannot_repeat(self):
        ''' The code can not be repeated '''
        customer2 = Customer(code=1, name='XX')

        self.obj.save()
        with self.assertRaises(IntegrityError):
            customer2.save()
Esempio n. 2
0
 def setUp(self):
     self.obj = Customer(code=1,
                         name='Emerson Henning',
                         nickname='Henemer',
                         address='Av. República Argentina',
                         number='1111',
                         complement='Apto.XXX',
                         district='Portão',
                         city='Curitiba',
                         state='PR',
                         zipcode='80610260',
                         cpf='00000000000',
                         rg='555555555-44',
                         phone1='41-9999-9999',
                         phone2='41-9999-9999',
                         phone3='41-9999-9999',
                         contact='Emerson',
                         email='*****@*****.**',
                         observations='Nennhuma observação a fazer')