示例#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, "", "")