mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
New unit test.
This commit is contained in:
@@ -11,6 +11,23 @@ from modoboa.parameters import tools as param_tools
|
||||
|
||||
from .. import factories
|
||||
from .. import models
|
||||
from .. import signals
|
||||
|
||||
|
||||
def announcement(sender, location, **kwargs):
|
||||
"""Simpler handler."""
|
||||
return "This is an annoucement!"
|
||||
|
||||
|
||||
class LoginTestCase(ModoTestCase):
|
||||
"""Login page test cases."""
|
||||
|
||||
def test_announcements(self):
|
||||
"""Check if announcements are displayed."""
|
||||
signals.get_announcements.connect(announcement)
|
||||
response = self.client.get(reverse("core:login"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertIn("This is an annoucement!", response.content)
|
||||
|
||||
|
||||
class DashboardTestCase(ModoTestCase):
|
||||
|
||||
Reference in New Issue
Block a user