trustpoint.tests.test_views.test_context_data¶
Tests for the ContextDataMixin class.
Classes¶
Mock view for testing ContextDataMixin. |
|
Test cases for ContextDataMixin. |
Module Contents¶
- class trustpoint.tests.test_views.test_context_data.MockView(**kwargs)[source]¶
Bases:
trustpoint.views.base.ContextDataMixin,django.views.generic.TemplateViewMock view for testing ContextDataMixin.
- class trustpoint.tests.test_views.test_context_data.ContextDataMixinTests(methodName='runTest')[source]¶
Bases:
django.test.TestCaseTest cases for ContextDataMixin.
- setUp()[source]¶
Hook method for setting up the test fixture before exercising it.
- Return type:
None
- test_context_attributes_added()[source]¶
Test that ‘context_’ prefixed attributes are added to the context data.
- test_no_unprefixed_attributes_added()[source]¶
Test that attributes without ‘context_’ prefix are not added to the context data.