Example #1
0
    def test_add_to_cart(self):
        client = Client("key", "value")
        params = {
            "modelId": 86,
        }
        client.add_to_cart(params)
        client._post.assert_called()
        client._post.assert_called_with("/orders/cart/", body=json.dumps(params))

        with self.assertRaises(Exception):
            client.add_to_cart({})
Example #2
0
    def test_add_to_cart(self):
        client = Client("key", "value")
        params = {
            "modelId": 86,
        }
        client.add_to_cart(params)
        client._post.assert_called()
        client._post.assert_called_with("/orders/cart/",
                                        body=json.dumps(params))

        with self.assertRaises(Exception):
            client.add_to_cart({})