reconcile method signatures

This commit is contained in:
woorst
2017-07-18 17:09:24 -05:00
parent 1807ea4aad
commit 9f59d941d7
4 changed files with 5 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ class Page(object):
self._row = 0
self._subwindows = None
def refresh_content(self, order=None, name=None):
def refresh_content(self, order=None, name=None, with_search=False):
raise NotImplementedError
def _draw_item(self, window, data, inverted):

View File

@@ -63,7 +63,7 @@ class SubmissionPage(Page):
self.active = False
@SubmissionController.register(Command('REFRESH'))
def refresh_content(self, order=None, name=None):
def refresh_content(self, order=None, name=None, with_search=False):
"Re-download comments and reset the page index"
order = order or self.content.order

View File

@@ -28,7 +28,7 @@ class SubscriptionPage(Page):
self.selected_subreddit = None
@SubscriptionController.register(Command('REFRESH'))
def refresh_content(self, order=None, name=None):
def refresh_content(self, order=None, name=None, with_search=False):
"Re-download all subscriptions and reset the page index"
# reddit.get_my_subreddits() does not support sorting by order

View File

@@ -81,7 +81,7 @@ def test_page_unauthenticated(reddit, terminal, config, oauth):
page.controller.trigger('3')
page.refresh_content.assert_called_with(order='rising')
page.controller.trigger('4')
page.refresh_content.assert_called_with(order='new')
page.refresh_content.assert_called_with(order='new', with_search=True)
logged_in_methods = [
'a', # Upvote
@@ -119,4 +119,4 @@ def test_page_authenticated(reddit, terminal, config, oauth, refresh_token):
# Logout
terminal.stdscr.getch.return_value = ord('y')
page.controller.trigger('u')
assert not reddit.is_oauth_session()
assert not reddit.is_oauth_session()