0001-idp_oidc-add-api-access-and-profile-management-to-BO.patch
src/authentic2_idp_oidc/manager/forms.py | ||
---|---|---|
38 | 38 |
'authorization_mode', |
39 | 39 |
'authorization_flow', |
40 | 40 |
'home_url', |
41 |
'has_api_access', |
|
42 |
'activate_user_profiles', |
|
41 | 43 |
'colour', |
42 | 44 |
'logo', |
43 | 45 |
] |
tests/idp_oidc/test_manager.py | ||
---|---|---|
37 | 37 |
form = resp.form |
38 | 38 |
form['name'] = 'Test' |
39 | 39 |
form['redirect_uris'] = 'http://example.com' |
40 |
form['has_api_access'] = True |
|
41 |
form['activate_user_profiles'] = True |
|
40 | 42 |
resp = form.submit() |
41 | 43 | |
42 | 44 |
assert OIDCClient.objects.count() == 1 |
43 | 45 |
assert OIDCClaim.objects.count() == len(oidc_app_settings.DEFAULT_MAPPINGS) |
44 | 46 |
oidc_client = OIDCClient.objects.get() |
47 |
assert oidc_client.has_api_access == True |
|
48 |
assert oidc_client.activate_user_profiles == True |
|
45 | 49 |
assert resp.location == f'/manage/services/{oidc_client.pk}/' |
46 | 50 |
resp = resp.follow() |
47 | 51 |
assert "Settings" in resp.text |
48 |
- |