From d62e73428c27aef2cca3f971bd7fd3c17bb8e591 Mon Sep 17 00:00:00 2001 From: afabiani Date: Tue, 30 Oct 2018 15:25:22 +0100 Subject: [PATCH] - Fix test cases --- geonode/tests/smoke.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/geonode/tests/smoke.py b/geonode/tests/smoke.py index 096ff1fba65..bd0b30d4f03 100644 --- a/geonode/tests/smoke.py +++ b/geonode/tests/smoke.py @@ -339,7 +339,7 @@ def test_inbox_redirects_when_not_logged_in(self): response = self.client.get(target_url) self.assertRedirects( response, - "{}?next={}".format(reverse("account_login"), 'http://testserver%s' % target_url) + "{}{}?next={}".format(settings.SITEURL[:-1], reverse("account_login"), target_url) ) def test_new_message_renders(self): @@ -355,7 +355,7 @@ def test_new_message_redirects_when_not_logged_in(self): response = self.client.get(target_url) self.assertRedirects( response, - "{}?next={}".format(reverse("account_login"), 'http://testserver%s' % target_url) + "{}{}?next={}".format(settings.SITEURL[:-1], reverse("account_login"), target_url) ) def test_thread_detail_renders(self): @@ -370,6 +370,7 @@ def test_thread_detail_redirects_when_not_logged_in(self): target_url = reverse("messages_thread_detail", args=(self.thread.id,)) response = self.client.get(target_url) self.assertRedirects( + settings.SITEURL[:-1], response, - "{}?next={}".format(reverse("account_login"), 'http://testserver%s' % target_url) + "{}{}?next={}".format(reverse("account_login"), target_url) )