oslo_reports.tests package¶
Submodules¶
oslo_reports.tests.test_base_report module¶
-
class
oslo_reports.tests.test_base_report.
BasicView
¶ Bases:
object
-
class
oslo_reports.tests.test_base_report.
TestBaseModel
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
test_data_as_sequence_is_handled_properly
()¶
-
test_getattr
()¶
-
test_immutable_mappings_produce_mutable_models
()¶
-
test_model_repr
()¶
-
test_str_returns_string_with_attached_view
()¶
-
test_str_throws_error_with_no_attached_view
()¶
-
test_submodel_attached_view
()¶
-
-
class
oslo_reports.tests.test_base_report.
TestBasicReport
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_add_section
()¶
-
test_append_section
()¶
-
test_basic_render
()¶
-
test_insert_section
()¶
-
-
oslo_reports.tests.test_base_report.
basic_generator
()¶
oslo_reports.tests.test_guru_meditation_report module¶
-
class
oslo_reports.tests.test_guru_meditation_report.
FakeVersionObj
¶ Bases:
object
-
product_string
()¶
-
vendor_string
()¶
-
version_string_with_package
()¶
-
-
class
oslo_reports.tests.test_guru_meditation_report.
GmrConfigFixture
(conf=<oslo_config.cfg.ConfigOpts object>)¶ Bases:
oslo_config.fixture.Config
-
setUp
()¶ Prepare the Fixture for use.
This should not be overridden. Concrete fixtures should implement _setUp. Overriding of setUp is still supported, just not recommended.
After setUp has completed, the fixture will have one or more attributes which can be used (these depend totally on the concrete subclass).
- Raises
MultipleExceptions if _setUp fails. The last exception captured within the MultipleExceptions will be a SetupError exception.
- Returns
None.
- Changed in 1.3
The recommendation to override setUp has been reversed - before 1.3, setUp() should be overridden, now it should not be.
- Changed in 1.3.1
BaseException is now caught, and only subclasses of Exception are wrapped in MultipleExceptions.
-
-
class
oslo_reports.tests.test_guru_meditation_report.
TestGuruMeditationReport
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
tearDown
()¶ Hook method for deconstructing the test fixture after testing it.
-
test_basic_report
()¶
-
test_fail_prints_traceback
(run_mock)¶
-
test_reg_persistent_section
()¶
-
test_register_autorun
()¶
-
test_register_autorun_log_dir
(mock_strtime)¶
-
test_register_autorun_without_signals
(mock_setup_fh)¶
-
test_setup_file_watcher
(mock_thread, mock_sleep, mock_stat)¶
-
-
oslo_reports.tests.test_guru_meditation_report.
skip_body_lines
(start_line, report_lines)¶
oslo_reports.tests.test_openstack_generators module¶
-
class
oslo_reports.tests.test_openstack_generators.
TestOpenstackGenerators
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
test_config_model
()¶
-
test_green_thread_generator
()¶
-
test_package_report_generator
()¶
-
test_package_report_generator_without_vendor_string
()¶
-
test_thread_generator
()¶
-
test_thread_generator_tb
()¶
-
oslo_reports.tests.test_views module¶
-
class
oslo_reports.tests.test_views.
TestGenericJSONViews
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_basic_kv_view
()¶
-
test_dict_in_list_serialization
()¶
-
test_dict_serialization
()¶
-
test_list_in_dict_serialization
()¶
-
test_list_serialization
()¶
-
test_submodel_serialization
()¶
-
-
class
oslo_reports.tests.test_views.
TestGenericTextViews
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_basic_kv_view
()¶
-
test_custom_indent_string
()¶
-
test_dict_in_list_serialization
()¶
-
test_dict_serialization
()¶
-
test_list_in_dict_serialization
()¶
-
test_list_serialization
()¶
-
test_multi_view
()¶
-
test_submodel_serialization
()¶
-
test_table_view
()¶
-
-
class
oslo_reports.tests.test_views.
TestGenericXMLView
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_dict_in_list_serialization
()¶
-
test_dict_serialization
()¶
-
test_list_in_dict_serialization
()¶
-
test_list_serialization
()¶
-
test_submodel_serialization
()¶
-
test_wrapper_name
()¶
-
-
class
oslo_reports.tests.test_views.
TestJinjaView
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
MM_FILE
= <MagicMock name='file_obj' id='140065325482560'>¶
-
MM_OPEN
= <MagicMock name='open' id='140065325547592'>¶
-
TEMPL_STR
= 'int is {{ int }}, string is {{ string }}'¶
-
setUp
()¶ Hook method for setting up the test fixture before exercising it.
-
test_direct_pass
()¶
-
test_is_deepcopiable
()¶
-
test_load_from_class
()¶
-
test_load_from_file
= <MagicMock name='open()' id='140065325593600'>¶
-
-
class
oslo_reports.tests.test_views.
TestModelReportType
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
test_model_with_default_views
()¶
-
test_recursive_type_propagation_with_nested_dicts
()¶
-
test_recursive_type_propagation_with_nested_lists
()¶
-
test_recursive_type_propagation_with_nested_models
()¶
-
test_recursive_type_propogation_on_recursive_structures
()¶
-
test_report_of_type
()¶
-
test_text_report
()¶
-
test_to_type
()¶
-
-
oslo_reports.tests.test_views.
get_open_mocks
(rv)¶
-
oslo_reports.tests.test_views.
mwdv_generator
()¶