new test for not yet existing debug mode warning
This commit is contained in:
parent
6becd8278b
commit
39cee37be8
|
@ -9,11 +9,16 @@ class LoginTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.client = Client()
|
self.client = Client()
|
||||||
self.user = User.objects.create_user('vladimir', 'vladimir@reiherzehe.com', 'reiherzehe')
|
self.user = User.objects.create_user('vladimir', 'vladimir@reiherzehe.com', 'reiherzehe')
|
||||||
|
self.client.login(username='vladimir', password='reiherzehe')
|
||||||
|
self.response = self.client.get('/')
|
||||||
|
|
||||||
def testLogin(self):
|
def testLogin(self):
|
||||||
self.client.login(username='vladimir', password='reiherzehe')
|
self.assertContains(self.response, 'Du bist eingeloggt als vladimir@reiherzehe.com', status_code=200)
|
||||||
response = self.client.get('/')
|
|
||||||
self.assertContains(response, 'Du bist eingeloggt als vladimir@reiherzehe.com', status_code=200)
|
def testDebugWarning(self):
|
||||||
|
with self.settings(DEBUG=True):
|
||||||
|
self.assertContains(self.response, "WARNUNG! Test-MODUS aktiviert. Es werden keine Mails verschickt!", status_code=200)
|
||||||
|
|
||||||
|
|
||||||
class SimpleTest(TestCase):
|
class SimpleTest(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
Loading…
Reference in New Issue