test__submit_breakdown#

For these tests, we will override the authorization dependency so that the tests are not dependent on cognito. We’ll assume that the test__auth service is sufficient.




Functions#

make_request_payload()#

tests.functional_tests.main.endpoints.test__submit_breakdown.make_request_payload(user_submission: dict) rootski.schemas.breakdown.BreakdownUpsert[source]#

make_submit_breakdown_request()#

tests.functional_tests.main.endpoints.test__submit_breakdown.make_submit_breakdown_request(user_submission: dict, dynamo_client: starlette.testclient.TestClient, should_succeed: bool) Union[Tuple[int, rootski.schemas.breakdown.SubmitBreakdownResponse], starlette.responses.Response][source]#

test__submit_breakdown__error_when_breakdown_doesnt_add_up()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__error_when_breakdown_doesnt_add_up(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService)[source]#

test__submit_breakdown__error_when_morpheme_ids_not_found()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__error_when_morpheme_ids_not_found(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService)[source]#

test__submit_breakdown__error_when_word_not_found()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__error_when_word_not_found(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService)[source]#

test__submit_breakdown__success()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__success(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService, act_as_admin: bool)[source]#

test__submit_breakdown__success_overwrite_official_breakdown()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__success_overwrite_official_breakdown(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService, act_as_admin: bool)[source]#

test__submit_breakdown__success_with_null_morpheme()#

tests.functional_tests.main.endpoints.test__submit_breakdown.test__submit_breakdown__success_with_null_morpheme(dynamo_client: starlette.testclient.TestClient, dynamo_db_service: rootski.services.database.dynamo.db_service.DBService)[source]#