File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
from gitlab import base
5
5
from gitlab import types as gl_types
6
+ from gitlab import utils
6
7
from gitlab .mixins import (
7
8
CreateMixin ,
8
9
DeleteMixin ,
@@ -173,11 +174,11 @@ class M(CreateMixin, FakeManager):
173
174
174
175
mgr = M (gl )
175
176
data = {"foo" : "bar" , "baz" : "blah" }
176
- mgr . _check_missing_create_attrs (data )
177
+ utils . _validate_attrs (data = data , attributes = mgr . _create_attrs )
177
178
178
179
data = {"baz" : "blah" }
179
180
with pytest .raises (AttributeError ) as error :
180
- mgr . _check_missing_create_attrs (data )
181
+ utils . _validate_attrs (data = data , attributes = mgr . _create_attrs )
181
182
assert "foo" in str (error .value )
182
183
183
184
@@ -239,11 +240,11 @@ class M(UpdateMixin, FakeManager):
239
240
240
241
mgr = M (gl )
241
242
data = {"foo" : "bar" , "baz" : "blah" }
242
- mgr . _check_missing_update_attrs (data )
243
+ utils . _validate_attrs (data = data , attributes = mgr . _update_attrs )
243
244
244
245
data = {"baz" : "blah" }
245
246
with pytest .raises (AttributeError ) as error :
246
- mgr . _check_missing_update_attrs (data )
247
+ utils . _validate_attrs (data = data , attributes = mgr . _update_attrs )
247
248
assert "foo" in str (error .value )
248
249
249
250
You can’t perform that action at this time.
0 commit comments