From bf985b30038f8f097c46ab363b82efaab14cfab6 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 23 Jan 2016 17:07:51 +0100 Subject: [PATCH] fix the test_create_unknown_path test --- gitlab/tests/test_gitlab.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index 7872083f3..1f15d305b 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -429,9 +429,8 @@ def test_create_kw_missing(self): self.assertRaises(GitlabCreateError, self.gl.create, obj) def test_create_unknown_path(self): - obj = User(self.gl, data={"email": "email", "password": "password", - "username": "username", "name": "name", - "can_create_group": True}) + obj = Project(self.gl, data={"name": "name"}) + obj.id = 1 obj._from_api = True @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1", @@ -442,7 +441,7 @@ def resp_cont(url, request): return response(404, content, headers, None, 5, request) with HTTMock(resp_cont): - self.assertRaises(GitlabCreateError, self.gl.create, obj) + self.assertRaises(GitlabDeleteError, self.gl.delete, obj) def test_create_401(self): obj = Group(self.gl, data={"name": "testgroup", "path": "testpath"})