File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,23 @@ def resp_cont(url, request):
376376 self .assertRaises (GitlabHttpError , self .gl .http_delete , "/not_there" )
377377
378378
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+
379396class TestGitlabAuth (unittest .TestCase ):
380397 def test_invalid_auth_args (self ):
381398 self .assertRaises (
You can’t perform that action at this time.
0 commit comments