summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-01-02 11:20:31 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2017-01-02 11:21:15 +0100
commit05b3abf99b7af987a66c549fbd66e11710d5e3e6 (patch)
tree3f146b79df4cf7b299171eb94a8046ac90ab623d
parent18415fe34f44892da504ec578ea35e74f0d78565 (diff)
downloadgitlab-05b3abf99b7af987a66c549fbd66e11710d5e3e6.tar.gz
Some objects need getRequires to be set to False
-rw-r--r--gitlab/objects.py3
-rw-r--r--tools/python_test.py8
2 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 4088661..8f44ef9 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -736,6 +736,7 @@ class CurrentUser(GitlabObject):
class ApplicationSettings(GitlabObject):
_url = '/application/settings'
_id_in_update_url = False
+ getRequiresId = False
optionalUpdateAttrs = ['after_sign_out_path',
'container_registry_token_expire_delay',
'default_branch_protection',
@@ -794,6 +795,7 @@ class KeyManager(BaseManager):
class NotificationSettings(GitlabObject):
_url = '/notification_settings'
_id_in_update_url = False
+ getRequiresId = False
optionalUpdateAttrs = ['level',
'notification_email',
'new_note',
@@ -2022,6 +2024,7 @@ class ProjectService(GitlabObject):
canCreate = False
_id_in_update_url = False
_id_in_delete_url = False
+ getRequiresId = False
requiredUrlAttrs = ['project_id', 'service_name']
_service_attrs = {
diff --git a/tools/python_test.py b/tools/python_test.py
index abfa508..55cb478 100644
--- a/tools/python_test.py
+++ b/tools/python_test.py
@@ -290,6 +290,14 @@ settings.save()
settings = gl.notificationsettings.get()
assert(settings.level == gitlab.NOTIFICATION_LEVEL_WATCH)
+# services
+service = admin_project.services.get(service_name='asana')
+service.active = True
+service.api_key = 'whatever'
+service.save()
+service = admin_project.services.get(service_name='asana')
+assert(service.active == True)
+
# snippets
snippets = gl.snippets.list()
assert(len(snippets) == 0)