Bases: openstack_dashboard.test.helpers.TestCase
Testing APIs.
For use with tests which deal with the underlying clients rather than stubbing out the openstack_dashboard.api.* methods.
Bases: openstack_dashboard.test.helpers.TestCase
Sets an active user with the “admin” role.
For testing admin-only views and functionality.
Bases: openstack_dashboard.test.helpers.TestCase
Test case for testing plugin system of Horizon.
For use with tests which deal with the pluggable dashboard and panel configuration, it takes care of backing up and restoring the Horizon configuration.
Bases: django.test.client.RequestFactory
Bases: openstack_dashboard.test.helpers.SeleniumTestCase
Version of AdminTestCase for Selenium.
Sets an active user with the “admin” role for testing admin-only views and functionality.
Bases: horizon.test.helpers.SeleniumTestCase
Bases: horizon.test.helpers.TestCase
Specialized base test case class for Horizon.
It gives access to numerous additional features:
- A full suite of test data through various attached objects and managers (e.g. self.servers, self.user, etc.). See the docs for TestData for more information.
- The mox mocking framework via self.mox.
- A set of request context data via self.context.
- A RequestFactory class which supports Django’s contrib.messages framework via self.factory.
- A ready-to-go request object via self.request.
- The ability to override specific time data controls for easier testing.
- Several handy additional assertion methods.
Check for form errors.
Asserts that the response does contain a form in its context, and that form has errors, if count were given, it must match the exact numbers of errors
Checks for no form errors.
Asserts that the response either does not contain a form in its context, or that if it does, that form has no errors.
Check for redirect.
Asserts that the given response issued a 302 redirect without processing the view which is redirected to.
Bases: django.test.utils.override_settings
override_settings which allows override an item in dict.
django original override_settings replaces a dict completely, however OpenStack dashboard setting has many dictionary configuration and there are test case where we want to override only one item in a dictionary and keep other items in the dictionary. This version of override_settings allows this if keep_dict is True.
If keep_dict False is specified, the original behavior of Django override_settings is used.