def test_home_with_whiteboard(self): msg = WhiteboardMessage(message='test_message') msg.save() response = self.client.get(reverse('home')) self.assertContains(response, 'whiteboard') self.assertContains(response, 'test_message')
def test_home_with_whiteboard(self): # @override_settings decorator does not work becase # appsettings.ENABLE_WHITEBOARD is just a constant that is being # assigned during first import appsettings.ENABLE_WHITEBOARD = True msg = WhiteboardMessage(message='test_message') msg.save() response = self.client.get(reverse('home')) self.assertContains(response, 'whiteboard') self.assertContains(response, 'test_message')