Fixing tests and adding cassettes

This commit is contained in:
Michael Lazar
2018-08-04 01:42:43 -04:00
parent b959b5d4bd
commit b8fb0cf418
8 changed files with 8866 additions and 2143 deletions

View File

@@ -58,7 +58,11 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
window.addstr.assert_any_call(0, 0, title)
# Banner
menu = '[1]hot [2]top [3]rising [4]new [5]controversial [6]gilded'.encode('utf-8')
menu = ('[1]hot '
'[2]top '
'[3]rising '
'[4]new '
'[5]controversial').encode('utf-8')
window.addstr.assert_any_call(0, 0, menu)
# Footer
@@ -181,9 +185,10 @@ def test_submission_order(submission_page):
assert submission_page.content.order == 'new'
submission_page.controller.trigger('5')
assert submission_page.content.order == 'controversial'
# I think we need a cassette for 'gilded' before this can work?
# submission_page.controller.trigger('6')
# assert submission_page.content.order == 'gilded'
# Shouldn't be able to sort the submission page by gilded
submission_page.controller.trigger('6')
assert submission_page.content.order == 'controversial'
def test_submission_move_top_bottom(submission_page):