Пример #1
0
 def test_code_attribute_is_set_to_None(self):
     """testing if the code attribute value will be regenerated from the
     name attribute if the code attribute is set to None
     """
     test_name = "This is a test client"
     test_code = "TIATC"
     self.kwargs['code'] = "AnotherCode"
     self.kwargs['name'] = test_name
     new_client = Client(**self.kwargs)
     new_client.code = None
     self.assertTrue(new_client.code.startswith(test_code))