Fixed tests.

This commit is contained in:
Michael Lazar
2015-12-09 01:41:37 -08:00
parent 329bfae1ec
commit c24c4669a4
4 changed files with 5 additions and 4 deletions

View File

@@ -194,7 +194,8 @@ class Terminal(object):
if n_cols is not None and n_cols <= 0:
return ''
string = unescape(string)
if isinstance(string, six.text_type):
string = unescape(string)
if self.ascii:
if isinstance(string, six.binary_type):

View File

@@ -31,7 +31,7 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
# Banner
menu = ('[1]hot '
'[2]top '
'[3]rising '
'[3]rising '
'[4]new '
'[5]controversial').encode('utf-8')
window.addstr.assert_any_call(0, 0, menu)

View File

@@ -24,7 +24,7 @@ def test_subreddit_page_construct(reddit, terminal, config, oauth):
# Banner
menu = ('[1]hot '
'[2]top '
'[3]rising '
'[3]rising '
'[4]new '
'[5]controversial').encode('utf-8')
window.addstr.assert_any_call(0, 0, menu)

View File

@@ -45,7 +45,7 @@ def test_subscription_page_construct(reddit, terminal, config, oauth,
# Banner shouldn't be drawn
menu = ('[1]hot '
'[2]top '
'[3]rising '
'[3]rising '
'[4]new '
'[5]controversial').encode('utf-8')
with pytest.raises(AssertionError):