tests.test_enrollment
Test enrollment endpoint
Module Contents
Functions
|
Test - verification code should succeed |
|
Test - No JWT --> fail |
|
Test - show verification code info |
Test - show verification code info |
|
|
Test - no JWT, should fail |
Test - no such code --> fail |
|
Test - sub in JWT cannot be found |
|
Test - have i been accepted, yes |
|
Test - have i been accepted, no |
|
|
Test - have i been - no JWt |
|
Test - get status |
|
Test - no such status |
|
Test - list enrollments |
|
Test - list enrollments as normal user |
|
Test - init new user |
|
Test - init as normal user --> fail |
|
Test - promote user |
|
Test - promote user, no permissions |
|
Test - lock |
|
Test - lock as normal use |
|
Test - accept enrollment |
|
Test - accept, no permissions -> fail |
|
Test - accept a ghost |
|
Test - create invite code |
|
Test - normal user create invite code --> fail |
|
Test - deactivate invite code |
|
Test - activate invite code |
|
Test - check invite code |
Test - enroll with invite code |
Attributes
- async test_enroll_verif_code(tilauspalvelu_jwt_admin_client)[source]
Test - verification code should succeed
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_enroll_verif_code_fail_no_jwt(unauth_client)[source]
Test - No JWT –> fail
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_enroll_show_verif_code(tilauspalvelu_jwt_admin_client)[source]
Test - show verification code info
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_enroll_show_verifcode_bad_code(tilauspalvelu_jwt_admin_client)[source]
Test - show verification code info
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_show_verifcode_no_jwt(unauth_client)[source]
Test - no JWT, should fail
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_show_verifcode_no_permission(tilauspalvelu_jwt_user_client)[source]
Test - no such code –> fail
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_show_verifcode_sub_is_bonkers(tilauspalvelu_jwt_without_proper_user_client)[source]
Test - sub in JWT cannot be found
- Parameters:
tilauspalvelu_jwt_without_proper_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_have_i_been_accepted_yes(tilauspalvelu_jwt_user_client)[source]
Test - have i been accepted, yes
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_have_i_been_accepted_no(tilauspalvelu_jwt_user_koira_client)[source]
Test - have i been accepted, no
- Parameters:
tilauspalvelu_jwt_user_koira_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_have_i_been_accepted_no_jwt(unauth_client)[source]
Test - have i been - no JWt
- Parameters:
unauth_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_status_koira(tilauspalvelu_jwt_admin_client)[source]
Test - get status
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_status_not_found(tilauspalvelu_jwt_admin_client)[source]
Test - no such status
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_list_as_adm(tilauspalvelu_jwt_admin_client)[source]
Test - list enrollments
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_list_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - list enrollments as normal user
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_post_init(tilauspalvelu_jwt_admin_client)[source]
Test - init new user
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_init_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - init as normal user –> fail
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_promote_demote(tilauspalvelu_jwt_admin_client)[source]
Test - promote user
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_promote_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - promote user, no permissions
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_lock(tilauspalvelu_jwt_admin_client)[source]
Test - lock
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_lock_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - lock as normal use
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_accept(tilauspalvelu_jwt_admin_client)[source]
Test - accept enrollment
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_accept_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - accept, no permissions -> fail
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_accept_no_such_user(tilauspalvelu_jwt_admin_client)[source]
Test - accept a ghost
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_invitecode_create(tilauspalvelu_jwt_admin_client)[source]
Test - create invite code
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_create_as_usr(tilauspalvelu_jwt_user_client)[source]
Test - normal user create invite code –> fail
- Parameters:
tilauspalvelu_jwt_user_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_invitecode_dectivate(tilauspalvelu_jwt_admin_client)[source]
Test - deactivate invite code
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None
- async test_invitecode_activate(tilauspalvelu_jwt_admin_client)[source]
Test - activate invite code
- Parameters:
tilauspalvelu_jwt_admin_client (async_asgi_testclient.TestClient)
- Return type:
None