mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 22:23:23 +00:00
com: add basics tests for ComAlert and ComInfo to detect regressions on tabs
This commit is contained in:
parent
3fc8688941
commit
d7a7613807
22
com/tests.py
22
com/tests.py
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user