healthchecks_healthchecks/hc/front/tests/test_mattermost_help.py
Pēteris Caune b859a71920
Rename "sign in" to "log in"
I like "sign in" better, but users from time
to time confuse "sign in" and "sign up" forms. To reduce
confusion potential, I'm renaming "sign in" to "log in".
2024-08-12 15:09:58 +03:00

21 lines
738 B
Python

from __future__ import annotations
from django.test.utils import override_settings
from hc.test import BaseTestCase
@override_settings(MATTERMOST_ENABLED=True, SITE_NAME="Mychecks")
class AddMattermostHelpTestCase(BaseTestCase):
def test_instructions_work(self) -> None:
r = self.client.get("/integrations/mattermost/")
self.assertContains(r, "please log into Mychecks", status_code=200)
self.assertContains(
r, "click on <strong>Add Integration</strong>", status_code=200
)
@override_settings(MATTERMOST_ENABLED=False)
def test_it_requires_mattermost_enabled(self) -> None:
r = self.client.get("/integrations/mattermost/")
self.assertEqual(r.status_code, 404)