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