def test_cart_invalid_payment()

in server/store/tests.py [0:0]


    def test_cart_invalid_payment(self):
        data = {
            "payment": {"method": "credit"},
            "customer": {"email": "foo@bar.com"},
            "items": [{"id": 1, "countRequested": 1}],
        }

        response = client.post(
            reverse("checkout"),
            json.dumps(data),
            content_type="application/json",
        )
        self.assertEqual(response.status_code, 501)
        self.assertEqual(response.json()["status"], "invalid_choice")