mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Changes testing to use more declarative status code names from DRF
This commit is contained in:

committed by
Trenton H

parent
0df91c31f1
commit
a6e2708605
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.test import override_settings
|
||||
from django.test import TestCase
|
||||
from rest_framework import status
|
||||
|
||||
|
||||
class TestViews(TestCase):
|
||||
@@ -28,7 +29,7 @@ class TestViews(TestCase):
|
||||
|
||||
def test_login_redirect(self):
|
||||
response = self.client.get("/")
|
||||
self.assertEqual(response.status_code, 302)
|
||||
self.assertEqual(response.status_code, status.HTTP_302_FOUND)
|
||||
self.assertEqual(response.url, "/accounts/login/?next=/")
|
||||
|
||||
def test_index(self):
|
||||
@@ -52,7 +53,7 @@ class TestViews(TestCase):
|
||||
response = self.client.get(
|
||||
"/",
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(
|
||||
response.context_data["webmanifest"],
|
||||
f"frontend/{language_actual}/manifest.webmanifest",
|
||||
|
Reference in New Issue
Block a user