UPD: try to make useful test stuff.
This commit is contained in:
@@ -11,11 +11,13 @@ class ViewsTestCase(SimpleTestCase):
|
||||
self.assertIn('dav_base/root.html', template_names)
|
||||
context = view.get_context_data()
|
||||
self.assertIn('root_urls', context)
|
||||
self.assertIsInstance(context['root_urls'], list)
|
||||
|
||||
def test_integrated_root(self):
|
||||
response = self.client.get('/')
|
||||
self.assertTemplateUsed(response, 'dav_base/root.html')
|
||||
self.assertIn('root_urls', response.context, '\'root_urls\' not in context of root view')
|
||||
self.assertIsInstance(response.context['root_urls'], list)
|
||||
|
||||
# TODO
|
||||
# Maybe we should set a defined module config, so we could
|
||||
|
||||
Reference in New Issue
Block a user