tests package#
Subpackages#
- tests.api package
- Submodules
- tests.api.test_endpoints module
ApplicationBackendStartupAndShutdownFunctionsTest
ApplicationBackendStartupAndShutdownFunctionsTest.setUp()
ApplicationBackendStartupAndShutdownFunctionsTest.setUpClass()
ApplicationBackendStartupAndShutdownFunctionsTest.tearDown()
ApplicationBackendStartupAndShutdownFunctionsTest.test_close_apache_kafka_producer_calls_close_on_the_server_AIOKafkaProducer_object()
ApplicationBackendStartupAndShutdownFunctionsTest.test_close_apache_kafka_producer_triggers_warning_when_supplied_fastapi_application_instance_has_no_kafka_producer_state_attribute()
ApplicationBackendStartupAndShutdownFunctionsTest.test_start_apache_kafka_producer_does_not_recreate_another_producer_on_the_same_instance_of_fastapi()
ApplicationBackendStartupAndShutdownFunctionsTest.test_start_apache_kafka_producer_sets_fastapi_app_kafka_producer_attribute()
ApplicationBackendStartupAndShutdownFunctionsTest.test_start_apache_kafka_producer_starts_AIOKafkaProducer_with_expected_argument_for_boostrap_servers()
ApplicationBackendStartupAndShutdownFunctionsTest.test_start_apache_kafka_producer_starts_the_kafka_producer()
ApplicationBackendStartupAndShutdownFunctionsTest.test_start_apache_kafka_producer_takes_a_fastapi_object_argument()
ApplicationBackendStartupAndShutdownTest
SetUpChatEndpointTestCase
SetUpChatEndpointTestCase.setUpClass()
SetUpChatEndpointTestCase.test_endpoint_creates_kafka_topic_for_the_chat_before_returning_response_on_successful_function_call()
SetUpChatEndpointTestCase.test_endpoint_creates_new_application_controller_for_chat_session()
SetUpChatEndpointTestCase.test_endpoint_creates_new_chat_uuid_in_database_chats_table()
SetUpChatEndpointTestCase.test_endpoint_does_not_create_new_application_controller_if_there_is_a_failure_to_create_kafka_topic()
SetUpChatEndpointTestCase.test_endpoint_only_takes_post_requests()
SetUpChatEndpointTestCase.test_endpoint_redirect_url_matches_that_of_the_expected_chat_url()
SetUpChatEndpointTestCase.test_endpoint_returns_redirect_response_pointing_to_the_url_for_the_chat()
SetUpChatEndpointTestCase.test_endpoint_returns_server_error_on_exception_from_function_to_create_kafka_topic()
SetUpChatEndpointTestCase.test_endpoint_takes_request_json_body_of_expected_type()
WebSocketTestCase
- Module contents
- tests.controller package
- Submodules
- tests.controller.test_controller module
ApplicationControllerTestCase
ApplicationControllerTestCase.setUpClass()
ApplicationControllerTestCase.test_controller_connects_to_chat_websocket_on_init()
ApplicationControllerTestCase.test_controller_constructor_has_array_of_unique_users_based_on_constructor_argument()
ApplicationControllerTestCase.test_controller_fails_to_connect_to_chat_websocket_on_invalid_url()
ApplicationControllerTestCase.test_controller_has_null_websocket_attribute_which_becomes_populated_on_connection()
ApplicationControllerTestCase.test_controller_has_string_chat_context_attribute_gotten_from_constructor()
ApplicationControllerTestCase.test_controller_has_web_socket_url_attribute_gotten_from_constructor()
ApplicationControllerTestCase.test_controller_method_for_connecting_to_websocket_can_send_messages_to_websocket()
ApplicationControllerTestCase.test_controller_on_init_initialises_base_kafka_manager_with_correct_arguments()
ApplicationControllerTestCase.test_initialised_controller_has_kafka_manager_attribute()
ApplicationControllerTestCase.test_set_websocket_invalid_type()
ApplicationControllerTestCase.test_that_controller_has_first_publisher_attribute_which_must_have_role_of_publisher()
ApplicationControllerTestCase.test_that_controller_raises_exception_on_nonsensical_input_for_number_of_participating_users()
ApplicationControllerTestCase.test_that_on_init_of_controller_all_consumers_in_kafka_manager_are_subscribed_to_group_chat_kafka_topic()
setUpModule()
tearDownModule()
- tests.controller.test_kafka_manager module
TestKafkaManager
TestKafkaManager.test_close_method_of_kafka_manager_class_stops_all_producers_and_producers()
TestKafkaManager.test_instantiated_kafka_manager_class_consumers_property_is_immutable()
TestKafkaManager.test_instantiated_kafka_manager_class_consumers_property_returns_a_tuple_of_AIOKafkaConsumers_objects()
TestKafkaManager.test_instantiated_kafka_manager_class_has_consumers_property()
TestKafkaManager.test_instantiated_kafka_manager_class_has_producers_property()
TestKafkaManager.test_instantiated_kafka_manager_class_producers_property_is_immutable()
TestKafkaManager.test_instantiated_kafka_manager_class_producers_property_returns_a_tuple_of_AIOKafkaProducers_objects()
TestKafkaManager.test_kafka_manager_class_exists()
TestKafkaManager.test_on_closure_of_kafka_manager_class_close_method_is_called()
TestKafkaManager.test_on_instantiation_of_kafka_manager_class_all_producer_and_consumer_instances_are_started()
TestKafkaManagerFactory
- Module contents
- tests.database package
- tests.json_defs package
- tests.models package
- tests.roles package
- Submodules
- tests.roles.test_roles module
TestRolesTestCase
TestRolesTestCase.setUp()
TestRolesTestCase.setUpClass()
TestRolesTestCase.teatDown()
TestRolesTestCase.test_role_enum_class_exists()
TestRolesTestCase.test_role_enum_has_NOT_SET_attribute()
TestRolesTestCase.test_role_enum_has_both_publisher_and_subscriber_representation_entities()
TestRolesTestCase.test_role_is_an_enum_instance_is_of_roles_class()
- Module contents
- tests.users package
- Submodules
- tests.users.test_users module
TestUserAsyncioMethodsTestCase
TestUserTestCase
TestUserTestCase.setUp()
TestUserTestCase.setUpClass()
TestUserTestCase.tearDown()
TestUserTestCase.test_role_setter_only_accepts_Role_object_argument()
TestUserTestCase.test_that_passed_name_and_display_picture_url_are_applied_to_user_instance()
TestUserTestCase.test_that_user_object_by_default_has_empty_username_and_image_url()
TestUserTestCase.test_user_can_be_initialised_with_particular_role()
TestUserTestCase.test_user_can_be_initialised_with_random_role()
TestUserTestCase.test_user_class_exists()
TestUserTestCase.test_user_has_display_picture_attribute()
TestUserTestCase.test_user_has_name_attribute()
TestUserTestCase.test_user_has_role_attribute()
TestUserTestCase.test_user_role_attribute_is_Role_NOT_SET_at_initialisation()
TestUserTestCase.test_user_role_getter_and_setter_are_properties()
TestUserTestCase.test_user_role_getter_returns_user_role_value()
TestUserTestCase.test_user_role_setter_sets_user_role_value()
TestUserTestCase.test_user_set_random_role_method_randomly_selects_role_on_user_instance()
- Module contents
- tests.utils package