Switching from a custom user model to a user profile *yikes*

This commit is contained in:
2020-09-10 22:30:29 +02:00
parent c4adc3f434
commit 533efb328c
13 changed files with 66 additions and 44 deletions

View File

@@ -3,7 +3,7 @@ from django.urls import reverse_lazy
from lostplaces_app.models import Place
from lostplaces_app.models import Explorer
from django.contrib.auth.models import User
from lostplaces_app.tests.models.test_place_model import mock_place
from lostplaces_app.tests import mock_user
@@ -23,7 +23,7 @@ class TestIsAuthenticated(TestCase):
response = self.client.get(url, follow=True)
self.assertRedirects(
response=response,
expected_url='?'.join([str(reverse_lazy('login')), 'redirect_to=/place/1/']),
expected_url='?'.join([str(reverse_lazy('login')), 'next=/place/1/']),
status_code=302,
target_status_code=200,
msg_prefix='''Accesing an IsAuthenticated view while not logged should
@@ -47,7 +47,7 @@ class TestIsPlaceSubmitter(TestCase):
self.assertEqual(response.status_code, 200)
def test_is_no_submitter(self):
Explorer.objects.create_user(
User.objects.create_user(
username='manfred',
password='Develop123'
)

View File

@@ -23,7 +23,7 @@ class TestPlaceCreateView(TestCase):
response = self.client.get(url)
self.assertRedirects(
response=response,
expected_url='?'.join([str(reverse_lazy('login')), 'redirect_to=/place/1/']),
expected_url='?'.join([str(reverse_lazy('login')), 'next=/place/1/']),
status_code=302,
target_status_code=200,
msg_prefix='''Accesing PlaceDetailView while not logged should