com: add basics tests for ComAlert and ComInfo to detect regressions on tabs

This commit is contained in:
Antoine Bartuccio 2019-08-29 17:29:38 +02:00
parent 3fc8688941
commit d7a7613807
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -33,6 +33,28 @@ from django.utils.translation import ugettext as _
from core.models import User, RealGroup 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): class ComTest(TestCase):
def setUp(self): def setUp(self):
call_command("populate") call_command("populate")