Commit 8a16a662 authored by Sli's avatar Sli

Merge branch 'bugfix' into 'master'

com/core: remove links to index edition that caused error 500

See merge request !230
parents d7b351a1 d7a76138
Pipeline #1998 passed with stage
in 24 minutes and 41 seconds
......@@ -33,6 +33,28 @@ from django.utils.translation import ugettext as _
from core.models import User, RealGroup
class ComAlertTest(TestCase):
def setUp(self):
call_command("populate")
def test_page_is_working(self):
self.client.login(username="comunity", password="plop")
response = self.client.get(reverse("com:alert_edit"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
class ComInfoTest(TestCase):
def setUp(self):
call_command("populate")
def test_page_is_working(self):
self.client.login(username="comunity", password="plop")
response = self.client.get(reverse("com:info_edit"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
class ComTest(TestCase):
def setUp(self):
call_command("populate")
......
......@@ -114,9 +114,6 @@ class ComTabsMixin(TabedViewMixin):
"name": _("Weekmail destinations"),
}
)
tab_list.append(
{"url": reverse("com:index_edit"), "slug": "index", "name": _("Index page")}
)
tab_list.append(
{"url": reverse("com:info_edit"), "slug": "info", "name": _("Info message")}
)
......
......@@ -83,7 +83,6 @@
<li><a href="{{ url('com:weekmail_destinations') }}">{% trans %}Weekmail destinations{% endtrans %}</a></li>
<li><a href="{{ url('com:news_new') }}">{% trans %}Create news{% endtrans %}</a></li>
<li><a href="{{ url('com:news_admin_list') }}">{% trans %}Moderate news{% endtrans %}</a></li>
<li><a href="{{ url('com:index_edit') }}">{% trans %}Edit index page{% endtrans %}</a></li>
<li><a href="{{ url('com:alert_edit') }}">{% trans %}Edit alert message{% endtrans %}</a></li>
<li><a href="{{ url('com:info_edit') }}">{% trans %}Edit information message{% endtrans %}</a></li>
<li><a href="{{ url('core:file_moderation') }}">{% trans %}Moderate files{% endtrans %}</a></li>
......
......@@ -405,11 +405,30 @@ class UserToolsTest(TestCase):
self.assertEquals(response.status_code, 403)
def test_page_is_working(self):
# Test for simple user
self.client.login(username="guy", password="plop")
response = self.client.get(reverse("core:user_tools"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
# Test for root
self.client.login(username="root", password="plop")
response = self.client.get(reverse("core:user_tools"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
# Test for skia
self.client.login(username="skia", password="plop")
response = self.client.get(reverse("core:user_tools"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
# Test for comunity
self.client.login(username="comunity", password="plop")
response = self.client.get(reverse("core:user_tools"))
self.assertNotEquals(response.status_code, 500)
self.assertEquals(response.status_code, 200)
# TODO: many tests on the pages:
# - renaming a page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment