mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Merge pull request #153 from DanielGrams/issue/152
BaseOAuth2ClientForm.scopes can not be updated #152
This commit is contained in:
commit
28b412b5d8
@ -77,8 +77,9 @@ class BaseOAuth2ClientForm(FlaskForm):
|
||||
if not obj:
|
||||
return
|
||||
|
||||
self.redirect_uris.data = os.linesep.join(obj.redirect_uris)
|
||||
self.scope.data = obj.scope.split(" ")
|
||||
formdata = self.meta.wrap_formdata(self, formdata)
|
||||
self.redirect_uris.process(formdata, os.linesep.join(obj.redirect_uris))
|
||||
self.scope.process(formdata, obj.scope.split(" "))
|
||||
|
||||
|
||||
class CreateOAuth2ClientForm(BaseOAuth2ClientForm):
|
||||
|
||||
@ -78,6 +78,7 @@ def test_update(client, seeder, utils, app, mocker, db_error):
|
||||
response,
|
||||
{
|
||||
"client_name": "Neuer Name",
|
||||
"redirect_uris": "localhost:1337\nlocalhost:1338",
|
||||
},
|
||||
)
|
||||
|
||||
@ -92,6 +93,7 @@ def test_update(client, seeder, utils, app, mocker, db_error):
|
||||
|
||||
oauth2_client = OAuth2Client.query.get(oauth2_client_id)
|
||||
assert oauth2_client.client_name == "Neuer Name"
|
||||
assert oauth2_client.redirect_uris == ["localhost:1337", "localhost:1338"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("db_error", [True, False])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user