onadata.apps.restservice.tests package¶
Subpackages¶
Submodules¶
onadata.apps.restservice.tests.test_restservice module¶
Test RestService model
- class onadata.apps.restservice.tests.test_restservice.RestServiceTest(methodName='runTest')¶
Bases:
TestBase
Test RestService model
- add_rest_service_with_username_and_id_string_in_uppercase()¶
Test that the service url is not case sensitive
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_add_rest_service_with_wrong_id_string()¶
Test the id_string is validated when adding a service url.
- test_add_service()¶
Test adding a restservice.
- test_anon_service_view()¶
Test the rest service section is not available to asynchronous users.
- test_clean_keys_of_slashes()¶
Test ServiceDefinition.clean_keys_of_slashes() function.
- test_create_rest_service()¶
Test the RestService model.
- test_delete_service()¶
Test deletion of a service.
- test_rest_service_not_set(mock_http)¶
Test a requests.post is not called when a service is not defined.
- test_service_definition()¶
Test the service_definition is an instance of RestServiceInterface
- test_textit_service(mock_http)¶
Test the textit service.
- wait(duration=1)¶
Sleep for 1 second or as defined by
duration
.