| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7bdb1be commit 4c6c778
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -206,6 +206,7 @@ def test_list_kw_missing(self): | |||
| 206 | 206 | self.assertRaises(GitlabListError, self.gl.list, ProjectBranch) | |
| 207 | 207 | ||
| 208 | 208 | def test_list_no_connection(self): | |
| 209 | + self.gl.set_url('http://localhost:66000') | ||
| 209 | 210 | self.assertRaises(GitlabConnectionError, self.gl.list, ProjectBranch, | |
| 210 | 211 | project_id=1) | |
| 211 | 212 | ||
@@ -348,7 +349,17 @@ def test_create_unknown_path(self): | |||
| 348 | 349 | obj = User(self.gl, data={"email": "email", "password": "password", | |
| 349 | 350 | "username": "username", "name": "name", | |
| 350 | 351 | "can_create_group": True}) | |
| 351 | - self.assertRaises(GitlabConnectionError, self.gl.create, obj) | ||
| 352 | + obj._created = True | ||
| 353 | + | ||
| 354 | + @urlmatch(scheme="http", netloc="localhost", path="/api/v3/projects/1", | ||
| 355 | + method="delete") | ||
| 356 | + def resp_cont(url, request): | ||
| 357 | + headers = {'content-type': 'application/json'} | ||
| 358 | + content = '{"message": "message"}'.encode("utf-8") | ||
| 359 | + return response(404, content, headers, None, 5, request) | ||
| 360 | + | ||
| 361 | + with HTTMock(resp_cont): | ||
| 362 | + self.assertRaises(GitlabCreateError, self.gl.create, obj) | ||
| 352 | 363 | ||
| 353 | 364 | def test_create_401(self): | |
| 354 | 365 | obj = Group(self.gl, data={"name": "testgroup", "path": "testpath"}) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments