diff options
Diffstat (limited to 'pyblackbird_cc/payments/tests')
-rw-r--r-- | pyblackbird_cc/payments/tests/test_views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyblackbird_cc/payments/tests/test_views.py b/pyblackbird_cc/payments/tests/test_views.py index 0b469b5..7d0f8b5 100644 --- a/pyblackbird_cc/payments/tests/test_views.py +++ b/pyblackbird_cc/payments/tests/test_views.py @@ -12,5 +12,8 @@ def test_cart_view(client, user): @pytest.mark.django_db -def test_add_resource_to_cart(resource, user): - url = reverse("payments:add_to_cart", args=[resource.pk]) +def test_add_resource_to_cart(client, resource, user): + url = reverse("payments:add_to_cart", kwargs={"resource_id": resource.id}) + client.force_login(user) + response = client.get(url) + assert response.status_code == 200 |