five9.tests package

Submodules

five9.tests.common module

class five9.tests.common.Common(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

five9.tests.common_crud module

class five9.tests.common_crud.CommonCrud[source]

Bases: object

Model

alias of BaseModel

five9_api = 'configuration'
setUp()[source]
test_create()[source]

It should use the proper method and args on the API with.

test_delete()[source]

It should call the delete method and args on the API.

It should search the remote for the name.

test_search_multiple()[source]

It should search the remote for the conjoined names.

test_search_return()[source]

It should return a list of the result objects.

test_write()[source]

It should call the write method on the API.

five9.tests.test_api module

class five9.tests.test_api.TestApi(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_model_bad()[source]

It should raise ValidationError when no model.

test_model_valid()[source]

It should return True when valid model method.

test_recordset_bad()[source]

It should raise ValidationError when no recordset.

test_recordset_model()[source]

It should raise ValidationError when recordset but no model.

test_recordset_valid()[source]

It should return True when valid recordset method.

class five9.tests.test_api.TestRecord[source]

Bases: object

model(*args, **kwargs)
recordset(*args, **kwargs)

five9.tests.test_base_model module

class five9.tests.test_base_model.TestBaseModel(methodName='runTest')[source]

Bases: unittest.case.TestCase

new_record()[source]
setUp()[source]
test__get_non_empty_dict()[source]

It should return the dict without NoneTypes.

test_call_and_serialize_no_refresh()[source]

It should return the deserialized data.

test_call_and_serialize_refresh_return()[source]

It should return the refreshed object.

test_dict_lookup_exist()[source]

It should return the attribute value when it exists.

test_dict_lookup_no_exist()[source]

It should raise a KeyError when the attribute isn’t a field.

test_dict_set_exist()[source]

It should set the attribute via the items.

test_dict_set_no_exist()[source]

It should raise a KeyError and not change the non-field.

test_get_exist()[source]

It should return the attribute if it exists.

test_get_no_exist()[source]

It should return the default if the attribute doesn’t exist.

test_read_none()[source]

It should return None if no result.

test_read_results()[source]

It should return the first result.

It should perform the proper search.

test_update()[source]

It should set the attributes to the provided values.

class five9.tests.test_base_model.TestModel(**kwargs)[source]

Bases: five9.models.base_model.BaseModel

Required Properties:

  • id (Integer): ID, an integer
id

ID

not_a_field = True

five9.tests.test_disposition module

class five9.tests.test_disposition.TestDisposition(methodName='runTest')[source]

Bases: five9.tests.common_crud.CommonCrud, unittest.case.TestCase

Model

alias of Disposition

setUp()[source]

five9.tests.test_environment module

class five9.tests.test_environment.TestEnvironment(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]
test_create_creates()[source]

It should create the record on the remote.

test_create_return_deserialized()[source]

It should return a deserialized memory record if no refresh.

test_create_return_refreshed()[source]

It should create the refreshed record when True.

test_delete()[source]

It should iterate and delete the recordset.

test_getattr_pass_through_to_model()[source]

It should return the correct model environment.

test_init_sets_five9()[source]

It should set the __five9__ attribute.

test_init_sets_model()[source]

It should set the __model__ attribute.

test_init_sets_records()[source]

It should set the __records__ attribute.

test_iter()[source]

It should iterate the records in the set.

test_new_gets_models()[source]

It should assign the __models__ class attribute.

test_read()[source]

It should call and return properly.

It should call search on the model and return a recordset.

test_write()[source]

It should iterate and write the recordset.

five9.tests.test_five9 module

class five9.tests.test_five9.TestFive9(methodName='runTest')[source]

Bases: five9.tests.common.Common

test_configuration()[source]

It should return an authenticated configuration service.

test_create_criteria_flat()[source]

It should return the proper criteria for the flat inputs.

test_create_criteria_list()[source]

It should create multiple criteria for a list.

test_create_mapping()[source]

It should output the proper mapping.

test_get_authenticated_client(*args, **keywargs)[source]

It should return a zeep client.

test_get_authenticated_session()[source]

It should return a requests session with authentication.

test_init_authentication()[source]

It should create a BasicAuth object with proper args.

test_init_username()[source]

It should assign the username during init.

test_parse_response()[source]

It should return the proper record.

test_supervisor()[source]

It should return an authenticated supervisor service.

test_supervisor_session()[source]

It should automatically create a supervisor session.

test_supervisor_session_cached()[source]

It should use a cached supervisor session after initial.

five9.tests.test_key_value_pair module

class five9.tests.test_key_value_pair.TestKeyValuePair(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_init_positional()[source]

It should allow positional key, value pairs.

five9.tests.test_web_connector module

class five9.tests.test_web_connector.TestWebConnector(methodName='runTest')[source]

Bases: five9.tests.common_crud.CommonCrud, unittest.case.TestCase

Model

alias of WebConnector

setUp()[source]

Module contents