diff --git a/gitlab/tests/mixins/test_mixin_methods.py b/gitlab/tests/mixins/test_mixin_methods.py index 557c02045..fbc16a9bb 100644 --- a/gitlab/tests/mixins/test_mixin_methods.py +++ b/gitlab/tests/mixins/test_mixin_methods.py @@ -44,7 +44,7 @@ def resp_cont(url, request): def test_refresh_mixin(gl): - class O(RefreshMixin, FakeObject): + class TestClass(RefreshMixin, FakeObject): pass @urlmatch(scheme="http", netloc="localhost", path="/api/v4/tests/42", method="get") @@ -55,7 +55,7 @@ def resp_cont(url, request): with HTTMock(resp_cont): mgr = FakeManager(gl) - obj = O(mgr, {"id": 42}) + obj = TestClass(mgr, {"id": 42}) res = obj.refresh() assert res is None assert obj.foo == "bar" @@ -265,7 +265,7 @@ def test_save_mixin(gl): class M(UpdateMixin, FakeManager): pass - class O(SaveMixin, base.RESTObject): + class TestClass(SaveMixin, base.RESTObject): pass @urlmatch(scheme="http", netloc="localhost", path="/api/v4/tests/42", method="put") @@ -276,7 +276,7 @@ def resp_cont(url, request): with HTTMock(resp_cont): mgr = M(gl) - obj = O(mgr, {"id": 42, "foo": "bar"}) + obj = TestClass(mgr, {"id": 42, "foo": "bar"}) obj.foo = "baz" obj.save() assert obj._attrs["foo"] == "baz" diff --git a/gitlab/tests/mixins/test_object_mixins_attributes.py b/gitlab/tests/mixins/test_object_mixins_attributes.py index 3502a93f9..d54fa3abf 100644 --- a/gitlab/tests/mixins/test_object_mixins_attributes.py +++ b/gitlab/tests/mixins/test_object_mixins_attributes.py @@ -27,35 +27,35 @@ def test_access_request_mixin(): - class O(AccessRequestMixin): + class TestClass(AccessRequestMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "approve") def test_subscribable_mixin(): - class O(SubscribableMixin): + class TestClass(SubscribableMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "subscribe") assert hasattr(obj, "unsubscribe") def test_todo_mixin(): - class O(TodoMixin): + class TestClass(TodoMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "todo") def test_time_tracking_mixin(): - class O(TimeTrackingMixin): + class TestClass(TimeTrackingMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "time_stats") assert hasattr(obj, "time_estimate") assert hasattr(obj, "reset_time_estimate") @@ -64,16 +64,16 @@ class O(TimeTrackingMixin): def test_set_mixin(): - class O(SetMixin): + class TestClass(SetMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "set") def test_user_agent_detail_mixin(): - class O(UserAgentDetailMixin): + class TestClass(UserAgentDetailMixin): pass - obj = O() + obj = TestClass() assert hasattr(obj, "user_agent_detail") diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index 4a8220725..127b2c1d0 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -86,10 +86,10 @@ def test_gitlab_build_list(gl): assert obj.total == 2 with HTTMock(resp_page_2): - l = list(obj) - assert len(l) == 2 - assert l[0]["a"] == "b" - assert l[1]["c"] == "d" + test_list = list(obj) + assert len(test_list) == 2 + assert test_list[0]["a"] == "b" + assert test_list[1]["c"] == "d" @with_httmock(resp_page_1, resp_page_2)