Removed LOGIN_URL settings from tests

This commit is contained in:
Karl Hobley 2015-01-19 15:25:31 +00:00
parent 32f2dddaa3
commit c0443d9a4a
2 changed files with 5 additions and 6 deletions

View file

@ -102,9 +102,6 @@ PASSWORD_HASHERS = (
COMPRESS_ENABLED = False # disable compression so that we can run tests on the content of the compress tag
LOGIN_REDIRECT_URL = 'wagtailadmin_home'
LOGIN_URL = 'wagtailadmin_login'
WAGTAILSEARCH_BACKENDS = {
'default': {

View file

@ -35,11 +35,13 @@ class TestAuthentication(TestCase, WagtailTestUtils):
user = get_user_model().objects.create_superuser(username='test', email='test@email.com', password='password')
# Post credentials to the login page
post_data = {
response = self.client.post(reverse('wagtailadmin_login'), {
'username': 'test',
'password': 'password',
}
response = self.client.post(reverse('wagtailadmin_login'), post_data)
# NOTE: This is set using a hidden field in reality
'next': reverse('wagtailadmin_home'),
})
# Check that the user was redirected to the dashboard
self.assertRedirects(response, reverse('wagtailadmin_home'))