ListRedditsContent.from_user method replaced with from_func; updated tests accordingly

This commit is contained in:
woorst
2016-07-17 19:52:35 -05:00
parent 96151408b3
commit bfba1c7ad2
6 changed files with 33 additions and 42 deletions

View File

@@ -220,14 +220,11 @@ def subreddit_page(reddit, terminal, config, oauth):
@pytest.fixture()
def reddits(reddit, terminal, config, oauth):
return reddit.get_popular_subreddits()
@pytest.fixture()
def list_reddits_page(reddit, name, reddits, terminal, config, oauth):
def list_reddits_page(reddit, terminal, config, oauth):
title = 'Popular Subreddits'
func = reddit.get_popular_subreddits
with terminal.loader():
page = ListRedditsPage(reddit, name, reddits, terminal, config, oauth)
page = ListRedditsPage(reddit, title, func, terminal, config, oauth)
assert terminal.loader.exception is None
page.draw()
return page