Merge remote-tracking branch 'origin/master' into woorst-more_listings

Conflicts:
	rtv/rtv.cfg
	tests/test_subreddit.py
This commit is contained in:
Michael Lazar
2016-07-21 14:21:34 -07:00
7 changed files with 3125 additions and 23 deletions

View File

@@ -226,3 +226,13 @@ def test_subreddit_draw_header(subreddit_page, refresh_token, terminal):
subreddit_page.draw()
text = 'My Submissions'.encode('utf-8')
terminal.stdscr.subwin.addstr.assert_any_call(0, 0, text)
def test_subreddit_frontpage_toggle(subreddit_page, terminal):
with mock.patch.object(terminal, 'prompt_input'):
terminal.prompt_input.return_value = 'aww'
subreddit_page.controller.trigger('/')
assert subreddit_page.content.name == '/r/aww'
subreddit_page.controller.trigger('p')
assert subreddit_page.content.name == '/r/front'