Skip to content

Commit bf985b3

Browse files
author
Gauvain Pocentek
committed
fix the test_create_unknown_path test
1 parent e40d9ac commit bf985b3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gitlab/tests/test_gitlab.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,8 @@ def test_create_kw_missing(self):
429429
self.assertRaises(GitlabCreateError, self.gl.create, obj)
430430

431431
def test_create_unknown_path(self):
432-
obj = User(self.gl, data={"email": "email", "password": "password",
433-
"username": "username", "name": "name",
434-
"can_create_group": True})
432+
obj = Project(self.gl, data={"name": "name"})
433+
obj.id = 1
435434
obj._from_api = True
436435

437436
@urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1",
@@ -442,7 +441,7 @@ def resp_cont(url, request):
442441
return response(404, content, headers, None, 5, request)
443442

444443
with HTTMock(resp_cont):
445-
self.assertRaises(GitlabCreateError, self.gl.create, obj)
444+
self.assertRaises(GitlabDeleteError, self.gl.delete, obj)
446445

447446
def test_create_401(self):
448447
obj = Group(self.gl, data={"name": "testgroup", "path": "testpath"})

0 commit comments

Comments
 (0)