UPD: try to make useful test stuff.

This commit is contained in:
2019-03-15 17:35:16 +01:00
parent 2dce52cb25
commit 1c3e5bf761
6 changed files with 130 additions and 2 deletions

View File

@@ -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