Laura10101 / contractor-tax-calculator

0 stars 2 forks source link

Payment API views tests failing with database access not allowed #167

Closed Laura10101 closed 11 months ago

Laura10101 commented 11 months ago

FAILED payments_api/test_views.py::test_patch_payment_with_null_payment_data - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_null_street1 - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_street2 - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_city - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_county - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_country - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_postcode - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_null_card_number - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_null_expiry - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_null_ccv2 - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it. FAILED payments_api/test_views.py::test_patch_payment_with_short_card_number - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_long_card_number - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_non_date_expiry - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_non_numeric_ccv2 - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
FAILED payments_api/test_views.py::test_patch_payment_with_nonexistent_payment_id - RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it

Laura10101 commented 11 months ago

Added @pytest.mark.django_db to all views tests.