summaryrefslogtreecommitdiff
path: root/gitlab/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/tests')
-rw-r--r--gitlab/tests/conftest.py1
-rw-r--r--gitlab/tests/mixins/test_meta_mixins.py2
-rw-r--r--gitlab/tests/mixins/test_mixin_methods.py1
-rw-r--r--gitlab/tests/objects/test_appearance.py1
-rw-r--r--gitlab/tests/objects/test_applications.py1
-rw-r--r--gitlab/tests/objects/test_badges.py2
-rw-r--r--gitlab/tests/objects/test_deploy_tokens.py1
-rw-r--r--gitlab/tests/objects/test_job_artifacts.py1
-rw-r--r--gitlab/tests/objects/test_jobs.py1
-rw-r--r--gitlab/tests/objects/test_packages.py1
-rw-r--r--gitlab/tests/objects/test_pipelines.py1
-rw-r--r--gitlab/tests/objects/test_project_merge_request_approvals.py1
-rw-r--r--gitlab/tests/objects/test_projects.py1
-rw-r--r--gitlab/tests/objects/test_resource_label_events.py2
-rw-r--r--gitlab/tests/objects/test_resource_state_events.py1
-rw-r--r--gitlab/tests/objects/test_runners.py1
-rw-r--r--gitlab/tests/objects/test_snippets.py1
-rw-r--r--gitlab/tests/objects/test_todos.py1
-rw-r--r--gitlab/tests/objects/test_variables.py1
-rw-r--r--gitlab/tests/test_base.py3
-rw-r--r--gitlab/tests/test_cli.py3
-rw-r--r--gitlab/tests/test_config.py5
-rw-r--r--gitlab/tests/test_gitlab.py1
-rw-r--r--gitlab/tests/test_gitlab_http_methods.py3
24 files changed, 10 insertions, 27 deletions
diff --git a/gitlab/tests/conftest.py b/gitlab/tests/conftest.py
index 74fb858..64df051 100644
--- a/gitlab/tests/conftest.py
+++ b/gitlab/tests/conftest.py
@@ -1,4 +1,5 @@
import pytest
+
import gitlab
diff --git a/gitlab/tests/mixins/test_meta_mixins.py b/gitlab/tests/mixins/test_meta_mixins.py
index 025e9f4..4c8845b 100644
--- a/gitlab/tests/mixins/test_meta_mixins.py
+++ b/gitlab/tests/mixins/test_meta_mixins.py
@@ -5,8 +5,8 @@ from gitlab.mixins import (
GetMixin,
ListMixin,
NoUpdateMixin,
- UpdateMixin,
RetrieveMixin,
+ UpdateMixin,
)
diff --git a/gitlab/tests/mixins/test_mixin_methods.py b/gitlab/tests/mixins/test_mixin_methods.py
index fbc16a9..626230e 100644
--- a/gitlab/tests/mixins/test_mixin_methods.py
+++ b/gitlab/tests/mixins/test_mixin_methods.py
@@ -1,5 +1,4 @@
import pytest
-
from httmock import HTTMock, response, urlmatch # noqa
from gitlab import base
diff --git a/gitlab/tests/objects/test_appearance.py b/gitlab/tests/objects/test_appearance.py
index 43ea574..0de6524 100644
--- a/gitlab/tests/objects/test_appearance.py
+++ b/gitlab/tests/objects/test_appearance.py
@@ -5,7 +5,6 @@ GitLab API: https://docs.gitlab.com/ce/api/appearance.html
import pytest
import responses
-
title = "GitLab Test Instance"
description = "gitlab-test.example.com"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_applications.py b/gitlab/tests/objects/test_applications.py
index f8b5d88..61de019 100644
--- a/gitlab/tests/objects/test_applications.py
+++ b/gitlab/tests/objects/test_applications.py
@@ -5,7 +5,6 @@ GitLab API: https://docs.gitlab.com/ce/api/applications.html
import pytest
import responses
-
title = "GitLab Test Instance"
description = "gitlab-test.example.com"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_badges.py b/gitlab/tests/objects/test_badges.py
index c9281ea..e226684 100644
--- a/gitlab/tests/objects/test_badges.py
+++ b/gitlab/tests/objects/test_badges.py
@@ -7,7 +7,7 @@ import re
import pytest
import responses
-from gitlab.v4.objects import ProjectBadge, GroupBadge
+from gitlab.v4.objects import GroupBadge, ProjectBadge
link_url = (
"http://example.com/ci_status.svg?project=example-org/example-project&ref=master"
diff --git a/gitlab/tests/objects/test_deploy_tokens.py b/gitlab/tests/objects/test_deploy_tokens.py
index 9cfa598..66a79fa 100644
--- a/gitlab/tests/objects/test_deploy_tokens.py
+++ b/gitlab/tests/objects/test_deploy_tokens.py
@@ -6,7 +6,6 @@ import responses
from gitlab.v4.objects import ProjectDeployToken
-
create_content = {
"id": 1,
"name": "test_deploy_token",
diff --git a/gitlab/tests/objects/test_job_artifacts.py b/gitlab/tests/objects/test_job_artifacts.py
index c441b4b..7c5f1df 100644
--- a/gitlab/tests/objects/test_job_artifacts.py
+++ b/gitlab/tests/objects/test_job_artifacts.py
@@ -5,7 +5,6 @@ GitLab API: https://docs.gitlab.com/ee/api/job_artifacts.html
import pytest
import responses
-
ref_name = "master"
job = "build"
diff --git a/gitlab/tests/objects/test_jobs.py b/gitlab/tests/objects/test_jobs.py
index ff468ef..104d59d 100644
--- a/gitlab/tests/objects/test_jobs.py
+++ b/gitlab/tests/objects/test_jobs.py
@@ -6,7 +6,6 @@ import responses
from gitlab.v4.objects import ProjectJob
-
job_content = {
"commit": {
"author_email": "admin@example.com",
diff --git a/gitlab/tests/objects/test_packages.py b/gitlab/tests/objects/test_packages.py
index 200a3e1..672eee0 100644
--- a/gitlab/tests/objects/test_packages.py
+++ b/gitlab/tests/objects/test_packages.py
@@ -8,7 +8,6 @@ import responses
from gitlab.v4.objects import GroupPackage, ProjectPackage, ProjectPackageFile
-
package_content = {
"id": 1,
"name": "com/mycompany/my-app",
diff --git a/gitlab/tests/objects/test_pipelines.py b/gitlab/tests/objects/test_pipelines.py
index f54aa7d..d474296 100644
--- a/gitlab/tests/objects/test_pipelines.py
+++ b/gitlab/tests/objects/test_pipelines.py
@@ -6,7 +6,6 @@ import responses
from gitlab.v4.objects import ProjectPipeline
-
pipeline_content = {
"id": 46,
"project_id": 1,
diff --git a/gitlab/tests/objects/test_project_merge_request_approvals.py b/gitlab/tests/objects/test_project_merge_request_approvals.py
index d8ed3a8..16d58bd 100644
--- a/gitlab/tests/objects/test_project_merge_request_approvals.py
+++ b/gitlab/tests/objects/test_project_merge_request_approvals.py
@@ -9,7 +9,6 @@ import responses
import gitlab
-
approval_rule_id = 1
approval_rule_name = "security"
approvals_required = 3
diff --git a/gitlab/tests/objects/test_projects.py b/gitlab/tests/objects/test_projects.py
index 14ab966..73e119b 100644
--- a/gitlab/tests/objects/test_projects.py
+++ b/gitlab/tests/objects/test_projects.py
@@ -7,7 +7,6 @@ import responses
from gitlab.v4.objects import Project
-
project_content = {"name": "name", "id": 1}
import_content = {
"id": 1,
diff --git a/gitlab/tests/objects/test_resource_label_events.py b/gitlab/tests/objects/test_resource_label_events.py
index 07f891c..deea8a0 100644
--- a/gitlab/tests/objects/test_resource_label_events.py
+++ b/gitlab/tests/objects/test_resource_label_events.py
@@ -6,9 +6,9 @@ import pytest
import responses
from gitlab.v4.objects import (
+ GroupEpicResourceLabelEvent,
ProjectIssueResourceLabelEvent,
ProjectMergeRequestResourceLabelEvent,
- GroupEpicResourceLabelEvent,
)
diff --git a/gitlab/tests/objects/test_resource_state_events.py b/gitlab/tests/objects/test_resource_state_events.py
index 01c1887..bf18193 100644
--- a/gitlab/tests/objects/test_resource_state_events.py
+++ b/gitlab/tests/objects/test_resource_state_events.py
@@ -10,7 +10,6 @@ from gitlab.v4.objects import (
ProjectMergeRequestResourceStateEvent,
)
-
issue_event_content = {"id": 1, "resource_type": "Issue"}
mr_event_content = {"id": 1, "resource_type": "MergeRequest"}
diff --git a/gitlab/tests/objects/test_runners.py b/gitlab/tests/objects/test_runners.py
index 7185c26..686eec2 100644
--- a/gitlab/tests/objects/test_runners.py
+++ b/gitlab/tests/objects/test_runners.py
@@ -5,7 +5,6 @@ import responses
import gitlab
-
runner_detail = {
"active": True,
"architecture": "amd64",
diff --git a/gitlab/tests/objects/test_snippets.py b/gitlab/tests/objects/test_snippets.py
index 7e8afc2..2540fc3 100644
--- a/gitlab/tests/objects/test_snippets.py
+++ b/gitlab/tests/objects/test_snippets.py
@@ -6,7 +6,6 @@ GitLab API: https://docs.gitlab.com/ce/api/project_snippets.html
import pytest
import responses
-
title = "Example Snippet Title"
visibility = "private"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_todos.py b/gitlab/tests/objects/test_todos.py
index 07bb680..058fe33 100644
--- a/gitlab/tests/objects/test_todos.py
+++ b/gitlab/tests/objects/test_todos.py
@@ -10,7 +10,6 @@ import responses
from gitlab.v4.objects import Todo
-
with open(os.path.dirname(__file__) + "/../data/todo.json", "r") as json_file:
todo_content = json_file.read()
json_content = json.loads(todo_content)
diff --git a/gitlab/tests/objects/test_variables.py b/gitlab/tests/objects/test_variables.py
index d79bf96..fae37a8 100644
--- a/gitlab/tests/objects/test_variables.py
+++ b/gitlab/tests/objects/test_variables.py
@@ -12,7 +12,6 @@ import responses
from gitlab.v4.objects import GroupVariable, ProjectVariable, Variable
-
key = "TEST_VARIABLE_1"
value = "TEST_1"
new_value = "TEST_2"
diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py
index 1c811cf..b3a58fc 100644
--- a/gitlab/tests/test_base.py
+++ b/gitlab/tests/test_base.py
@@ -17,9 +17,10 @@
import pickle
-from gitlab import base
import pytest
+from gitlab import base
+
class FakeGitlab(object):
pass
diff --git a/gitlab/tests/test_cli.py b/gitlab/tests/test_cli.py
index b7fd369..a9ca958 100644
--- a/gitlab/tests/test_cli.py
+++ b/gitlab/tests/test_cli.py
@@ -17,10 +17,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import argparse
+import io
import os
import tempfile
-import io
-
from contextlib import redirect_stderr # noqa: H302
import pytest
diff --git a/gitlab/tests/test_config.py b/gitlab/tests/test_config.py
index 18b54c8..cd61b8d 100644
--- a/gitlab/tests/test_config.py
+++ b/gitlab/tests/test_config.py
@@ -15,15 +15,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import io
import os
from textwrap import dedent
import mock
-import io
-
-from gitlab import config, USER_AGENT
import pytest
+from gitlab import config, USER_AGENT
custom_user_agent = "my-package/1.0.0"
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index 127b2c1..acb8752 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -24,7 +24,6 @@ from httmock import HTTMock, response, urlmatch, with_httmock # noqa
from gitlab import Gitlab, GitlabList, USER_AGENT
from gitlab.v4.objects import CurrentUser
-
username = "username"
user_id = 1
diff --git a/gitlab/tests/test_gitlab_http_methods.py b/gitlab/tests/test_gitlab_http_methods.py
index 020fabf..f1bc9cd 100644
--- a/gitlab/tests/test_gitlab_http_methods.py
+++ b/gitlab/tests/test_gitlab_http_methods.py
@@ -1,7 +1,6 @@
import pytest
import requests
-
-from httmock import HTTMock, urlmatch, response
+from httmock import HTTMock, response, urlmatch
from gitlab import GitlabHttpError, GitlabList, GitlabParsingError