Fixed tests.
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user