reconcile method signatures
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user