The congress.tests.helper Module¶
-
class
congress.tests.helper.FakeRequest(body)¶ Bases:
object
-
class
congress.tests.helper.FakeServiceObj¶ Bases:
object
-
exception
congress.tests.helper.TestFailureException(*args, **kwargs)¶ Bases:
exceptions.ExceptionCustom exception thrown on test failure
Facilitates using assertRaises to check for failure on retry tests (generic Exception in assertRaises disallowed by pep8 check/gate)
-
congress.tests.helper.api_module_path()¶ Return path to api module.
-
congress.tests.helper.check_db_diffs(actual, correct, output_diff=True)¶
-
congress.tests.helper.check_subscribers(deepsix, subscriber_list, any_=False)¶ Check subscribers.
Check that the instance DEEPSIX includes subscriptions for all of the (name, dataindex) pairs in SUBSCRIBER_LIST. Return True if all subscribers exist; otherwise returns False.
If any_=True, then return True if ANY subscribers exist in subscriber_list
-
congress.tests.helper.check_subscriptions(deepsix, subscription_list)¶ Check subscriptions.
Check that the instance DEEPSIX is subscribed to all of the (key, dataindex) pairs in KEY_DATAINDEX_LIST. Return True if all subscriptions exists; otherwise returns False.
-
congress.tests.helper.data_module_path(file)¶ Return path to dataservice module with given FILEname.
-
congress.tests.helper.datalog_equal(actual_code, correct_code, msg=None, equal=None, theories=None, output_diff=True)¶ Check equality.
Check if the strings given by actual_code and CORRECT_CODE represent the same datalog.
-
congress.tests.helper.datalog_same(actual_code, correct_code, msg=None)¶
-
congress.tests.helper.datasource_config_path()¶ Return path to configuration info for datasources.
-
congress.tests.helper.datasource_openstack_args()¶ Return basic args for creating an openstack datasource.
-
congress.tests.helper.db_equal(actual_string, correct_string, output_diff=True)¶ Check if two strings representing data theories are the same.
-
congress.tests.helper.etcdir(*p)¶
-
congress.tests.helper.form2str(formula)¶
-
congress.tests.helper.generate_messaging_config()¶
-
congress.tests.helper.get_new_partition()¶ Create a new partition number, unique within each process.
-
congress.tests.helper.make_dsenode_new_partition(node_id, messaging_config=None, node_rpc_endpoints=None)¶ Get new DseNode in it’s own new DSE partition.
-
congress.tests.helper.make_dsenode_same_partition(existing, node_id, messaging_config=None, node_rpc_endpoints=None)¶ Get new DseNode in the same DSE partition as existing (node or part).
-
congress.tests.helper.output_diffs(extra, missing, actual=None)¶
-
congress.tests.helper.pause(factor=1)¶ Timeout so other threads can run.
-
congress.tests.helper.pol2str(policy)¶
-
congress.tests.helper.policy_module_path()¶ Return path to policy engine module.
-
congress.tests.helper.retry_check_db_equal(*args, **kw)¶
-
congress.tests.helper.retry_check_empty_last_policy_change(*args, **kw)¶
-
congress.tests.helper.retry_check_for_last_message(*args, **kw)¶
-
congress.tests.helper.retry_check_for_message_data(*args, **kw)¶
-
congress.tests.helper.retry_check_for_message_to_arrive(*args, **kw)¶
-
congress.tests.helper.retry_check_function_return_value(*args, **kw)¶ Check if function f returns expected key.
-
congress.tests.helper.retry_check_function_return_value_not_eq(*args, **kw)¶ Check if function f does not return expected value.
-
congress.tests.helper.retry_check_function_return_value_table(*args, **kw)¶ Check if function f returns expected table.
-
congress.tests.helper.retry_check_no_subscribers(*args, **kw)¶ Check that deepsix has none of the subscribers in subscriber_list
-
congress.tests.helper.retry_check_nonempty_last_policy_change(*args, **kw)¶
-
congress.tests.helper.retry_check_number_of_updates(*args, **kw)¶
-
congress.tests.helper.retry_check_subscribers(*args, **kw)¶
-
congress.tests.helper.retry_check_subscriptions(*args, **kw)¶
-
congress.tests.helper.retry_til_exception(*args, **kw)¶ Check if function f does not return expected value.
-
congress.tests.helper.root_path()¶ Return path to root of source code.
-
congress.tests.helper.source_path()¶ Return path to root of source code.
-
congress.tests.helper.str2form(formula_string, theories=None)¶
-
congress.tests.helper.str2pol(policy_string, theories=None)¶
-
congress.tests.helper.test_path(file=None)¶ Return path to root of top-level tests. Joined with file if provided.