def test_remove_customer(self): customer = views.get_customer(1) self.assertIsNotNone(customer.pk) views.remove_customer(customer.pk) with self.assertRaises(ObjectDoesNotExist): views.get_customer(1)
def test_remove_invalid_customer(self): with self.assertRaises(ObjectDoesNotExist): views.remove_customer(99999)