February 2018
Intermediate to advanced
456 pages
9h 56m
English
The get_customer_incomplete_orders method returns all the orders with the statuses that are different from Completed given a customer ID. For this test, we need to verify that:
def test_get_customer_incomplete_orders(self): orders = Order.objects.get_customer_incomplete_orders(customer_id=1) self.assertEqual(1, len(orders)) self.assertEqual(Status.Received.value, orders[0].status)def test_get_customer_incomplete_orders_with_invalid_id(self): with self.assertRaises(InvalidArgumentError): ...
Read now
Unlock full access