Cherry picking backwards-compatible changes from the themes branch

This commit is contained in:
Michael Lazar
2017-09-08 01:10:32 -04:00
parent 0268408f71
commit 982861560a
16 changed files with 414 additions and 248 deletions

View File

@@ -79,15 +79,16 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
# Comment
comment_data = page.content.get(0)
text = comment_data['split_body'][0].encode('utf-8')
window.subwin.addstr.assert_any_call(1, 1, text)
window.subwin.addstr.assert_any_call(1, 1, text, curses.A_NORMAL)
# More Comments
comment_data = page.content.get(1)
text = comment_data['body'].encode('utf-8')
window.subwin.addstr.assert_any_call(0, 1, text)
window.subwin.addstr.assert_any_call(0, 1, text, curses.A_NORMAL)
# Cursor should not be drawn when the page is first opened
assert not window.subwin.chgat.called
# TODO: Add a new test for this
# assert not window.subwin.chgat.called
# Reload with a smaller terminal window
terminal.stdscr.ncols = 20
@@ -264,7 +265,7 @@ def test_submission_comment_not_enough_space(submission_page, terminal):
text = '(Not enough space to display)'.encode('ascii')
window = terminal.stdscr.subwin
window.subwin.addstr.assert_any_call(6, 1, text)
window.subwin.addstr.assert_any_call(6, 1, text, curses.A_NORMAL)
def test_submission_vote(submission_page, refresh_token):