Adding general test coverage.

This commit is contained in:
Michael Lazar
2016-08-10 01:32:02 -07:00
parent c096d7014c
commit 17425008b3
7 changed files with 1079 additions and 4 deletions

View File

@@ -195,12 +195,24 @@ def test_subreddit_open_subscriptions(subreddit_page, refresh_token):
subreddit_page.config.refresh_token = refresh_token
subreddit_page.oauth.authorize()
# Open a subscription
# Open subscriptions
with mock.patch('rtv.page.Page.loop') as loop:
subreddit_page.controller.trigger('s')
assert loop.called
def test_subreddit_open_multireddits(subreddit_page, refresh_token):
# Log in
subreddit_page.config.refresh_token = refresh_token
subreddit_page.oauth.authorize()
# Open multireddits
with mock.patch('rtv.page.Page.loop') as loop:
subreddit_page.controller.trigger('S')
assert loop.called
def test_subreddit_draw_header(subreddit_page, refresh_token, terminal):
# /r/front alias should be renamed in the header