jerrycan.test.misc package

Submodules

jerrycan.test.misc.TestApiCalls module

class jerrycan.test.misc.TestApiCalls.TestApiCalls(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Class that tests various API calls

test_exception_in_api_route()

Tests if an exeption on an API route is correctly wrapped in a JSON response :return: None

test_expired_api_key()

Tests using an expired API key :return: None

test_non_base64_header()

Tests using a header that’s not base64 encoded :return: None

test_random_exception()

Tests that the API routes catch any Exceptions without issue :return: None

test_unauthorized_call()

Tests and unauthorized API call :return: None

test_using_non_json_data()

Tests sending the data as something that’s not JSON :return: None

jerrycan.test.misc.TestConfig module

class jerrycan.test.misc.TestConfig.TestConfig(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Class that tests the config class

test_building_base_url()

Tests building the base URL :return: None

test_db_config()

Tests the database configuration :return: None

test_dumping_environment_variables()

Tests dumping environment variables :return: None

test_environment_variables_definitions()

Tests the definition of the environent variables :return: None

test_initializing_telegram_bot_connection()

‘Tests’ initializing the telegram bot connection :return: None

test_version()

Tests if the version is fetched correctly :return: None

jerrycan.test.misc.TestErrorHandling module

class jerrycan.test.misc.TestErrorHandling.TestErrorHandling(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Class that tests the flask error handling

test_404()

Tests if a 404 error is handled correctly :return: None

test_api_exception()

Tests if ApiExceptions in the API are handled correctly :return: None

test_exception()

Tests if unexpected exceptions are caught correctly :return: None

jerrycan.test.misc.TestInitialization module

class jerrycan.test.misc.TestInitialization.TestInitialization(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Tests the initialization of the flask application

test_db_connection_error()

Tests if a database connection error is handled correctly :return: None

test_missing_environment_variables()

Tests if missing environment variables are detected correctly :return: None

test_missing_required_template()

Tests if missing template files are detected correctly :return: None

test_no_extra_jinja()

Tests if not providing any additional jinja variables works as intended :return: None

jerrycan.test.misc.TestTelegramBackground module

class jerrycan.test.misc.TestTelegramBackground.TestTelegramBackground(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Tests the telegram background functions

test_whoami()

Tests the whoami functionality :return: None

jerrycan.test.misc.TestWsgi module

class jerrycan.test.misc.TestWsgi.TestWsgi(methodName='runTest')

Bases: jerrycan.test.TestFramework._TestFramework

Tests the WSGI server

test_starting_and_stopping_wsgi_server()

Tests starting and stopping the WSGI server :return: None

test_starting_background_tasks()

Tests starting background tasks :return: None

Module contents