1616
1717
1818class TestProject (unittest .TestCase ):
19- """Base class for GitLab Project tests"""
19+ """Base class for GitLab Project tests. """
2020
2121 def setUp (self ):
2222 self .gl = Gitlab (
@@ -150,7 +150,7 @@ def resp_create_snippet(url, request):
150150 scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/1/export" , method = "post" ,
151151)
152152def resp_create_export (url , request ):
153- """Common mock for Project Export tests"""
153+ """Common mock for Project Export tests. """
154154 content = """{
155155 "message": "202 Accepted"
156156 }"""
@@ -162,7 +162,7 @@ def resp_create_export(url, request):
162162 scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/1/export" , method = "get" ,
163163)
164164def resp_export_status (url , request ):
165- """mock for Project Export GET response"""
165+ """Mock for Project Export GET response. """
166166 content = """{
167167 "id": 1,
168168 "description": "Itaque perspiciatis minima aspernatur",
@@ -218,7 +218,7 @@ def test_download_project_export(self):
218218 scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/import" , method = "post" ,
219219)
220220def resp_import_project (url , request ):
221- """Mock for Project Import POST response"""
221+ """Mock for Project Import POST response. """
222222 content = """{
223223 "id": 1,
224224 "description": null,
@@ -237,7 +237,7 @@ def resp_import_project(url, request):
237237 scheme = "http" , netloc = "localhost" , path = "/api/v4/projects/1/import" , method = "get" ,
238238)
239239def resp_import_status (url , request ):
240- """Mock for Project Import GET response"""
240+ """Mock for Project Import GET response. """
241241 content = """{
242242 "id": 1,
243243 "description": "Itaque perspiciatis minima aspernatur corporis consequatur.",
@@ -253,13 +253,9 @@ def resp_import_status(url, request):
253253
254254
255255@urlmatch (
256- scheme = "http" ,
257- netloc = "localhost" ,
258- path = "/api/v4/import/github" ,
259- method = "post" ,
256+ scheme = "http" , netloc = "localhost" , path = "/api/v4/import/github" , method = "post" ,
260257)
261258def resp_import_github (url , request ):
262- headers = {"content-type" : "application/json" }
263259 content = """{
264260 "id": 27,
265261 "name": "my-repo",
@@ -276,7 +272,7 @@ def test_import_project(self):
276272 project_import = self .gl .projects .import_project ("file" , "api-project" )
277273 self .assertEqual (project_import ["import_status" ], "scheduled" )
278274
279- @with_httmock (resp_import_project , resp_import_status )
275+ @with_httmock (resp_import_status )
280276 def test_refresh_project_import_status (self ):
281277 project_import = self .project .imports .get ()
282278 project_import .refresh ()
0 commit comments