We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8f0921 commit 32844c7Copy full SHA for 32844c7
1 file changed
gitlab/tests/test_gitlab.py
@@ -376,6 +376,23 @@ def resp_cont(url, request):
376
self.assertRaises(GitlabHttpError, self.gl.http_delete, "/not_there")
377
378
379
+class TestGitlabStripBaseUrl(unittest.TestCase):
380
+ def setUp(self):
381
+ self.gl = Gitlab(
382
+ "http://localhost/", private_token="private_token", api_version=4
383
+ )
384
+
385
+ def test_strip_base_url(self):
386
+ self.assertEqual(self.gl.url, "http://localhost")
387
388
+ def test_strip_api_url(self):
389
+ self.assertEqual(self.gl.api_url, "http://localhost/api/v4")
390
391
+ def test_build_url(self):
392
+ r = self.gl._build_url("/projects")
393
+ self.assertEqual(r, "http://localhost/api/v4/projects")
394
395
396
class TestGitlabAuth(unittest.TestCase):
397
def test_invalid_auth_args(self):
398
self.assertRaises(
0 commit comments