Skip to content

Commit fdf5004

Browse files
Fix pylint no-self-use and arguments-differ in test/unit/pagination
1 parent 7650e21 commit fdf5004

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/unit/pagination/box_object_collection_test_base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
class BoxObjectCollectionTestBase(object):
1414
NUM_ENTRIES = 25
1515

16+
@staticmethod
1617
@pytest.fixture()
17-
def translator(self):
18+
def translator():
1819
return Translator()
1920

2021
@pytest.fixture()
@@ -51,7 +52,8 @@ def _object_collection_instance(self, session, limit, return_full_pages=False, s
5152
"""
5253
raise NotImplementedError
5354

54-
def _assert_items_dict_and_objects_same(self, expected_items_dict, returned_item_objects):
55+
@staticmethod
56+
def _assert_items_dict_and_objects_same(expected_items_dict, returned_item_objects):
5557
"""
5658
A fixture very specific to this test class. Asserts that the list of items in dictionary form are the
5759
same (at least in name, and in quantity) as a list of BaseObjects.

test/unit/pagination/test_marker_based_object_collection.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ class TestMarkerBasedObjectCollection(BoxObjectCollectionTestBase):
2020

2121
NO_NEXT_MARKER = object()
2222

23+
@staticmethod
2324
@pytest.fixture(params=['', None, NO_NEXT_MARKER])
24-
def next_marker_value_for_last_page(self, request):
25+
def next_marker_value_for_last_page(request):
2526
return request.param
2627

2728
@pytest.fixture()
2829
def mock_items_response(self, entries, next_marker_value_for_last_page):
2930
"""Baseclass override."""
30-
# pylint:disable=redefined-outer-name
31+
# pylint:disable=redefined-outer-name,arguments-differ
3132
def get_response(limit, marker):
3233
mock_box_response = Mock(BoxResponse)
3334
mock_network_response = Mock(DefaultNetworkResponse)

0 commit comments

Comments
 (0)