def test_update_customer_invalid_email(self): with self.assertRaises(ValidationError): views.update_customer(1, CUSTOMER_NAME, "")
def test_update_customer(self): customer = views.update_customer(1, "Update Updaterson", CUSTOMER_EMAIL) self.assertEqual(customer.name, "Update Updaterson")
def test_update_invalid_customer(self): with self.assertRaises(ObjectDoesNotExist): views.update_customer(99999, "", "")