Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2706a5

Browse files
jhunkenlbalmaceda
authored andcommitted
Fix rules_config#unset (auth0#195)
* use path param instead of query param * fix unittest
1 parent af5d863 commit a2706a5

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

auth0/v3/management/rules_configs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ def unset(self, key):
3939
4040
See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/delete_rules_configs_by_key
4141
"""
42-
params = {
43-
'key': key
44-
}
45-
return self.client.delete(self._url(), params=params)
42+
return self.client.delete(self._url(key))
4643

4744
def set(self, key, value):
4845
"""Sets the rules config for a given key.

auth0/v3/test/management/test_rules_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_unset(self, mock_rc):
2525
c.unset('an-id')
2626

2727
mock_instance.delete.assert_called_with(
28-
'https://domain/api/v2/rules-configs', params={'key': 'an-id'}
28+
'https://domain/api/v2/rules-configs/an-id'
2929
)
3030

3131
@mock.patch('auth0.v3.management.rules_configs.RestClient')

0 commit comments

Comments
 (0)