From 032245ae3b748f784d3f0d9dc1c76dcb8deb806c Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 20 Sep 2021 10:28:53 +0200 Subject: [PATCH] better test of debug warning --- TODO | 2 ++ evapp/tests.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 5d8ef6a..4725632 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ * remove dot before "Nextcloud" at login page. * test for complete run with all forms + +* firstname lastname in subject diff --git a/evapp/tests.py b/evapp/tests.py index 3568ae2..6c3f411 100644 --- a/evapp/tests.py +++ b/evapp/tests.py @@ -19,6 +19,9 @@ class LoginTestCase(TestCase): with self.settings(DEBUG=True): self.response = self.client.get('/') # we need to do it again with DEBUG = True self.assertContains(self.response, "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!", status_code=200) + with self.settings(DEBUG=False) and self.settings(MAILTEST=False): + self.response = self.client.get('/') # we need to do it again with DEBUG = False + self.assertNotContains(self.response, "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!", status_code=200) def testWizzard(self): ''' this test goes thru the whole process of the EvaFormView from start to end ''' @@ -66,8 +69,6 @@ class LoginTestCase(TestCase): raise "NO FORM FOUND" - - class NoLoginTestCase(TestCase): def setUp(self): self.client = Client()