Fixed tests.
This commit is contained in:
@@ -194,7 +194,8 @@ class Terminal(object):
|
|||||||
if n_cols is not None and n_cols <= 0:
|
if n_cols is not None and n_cols <= 0:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
string = unescape(string)
|
if isinstance(string, six.text_type):
|
||||||
|
string = unescape(string)
|
||||||
|
|
||||||
if self.ascii:
|
if self.ascii:
|
||||||
if isinstance(string, six.binary_type):
|
if isinstance(string, six.binary_type):
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
|
|||||||
# Banner
|
# Banner
|
||||||
menu = ('[1]hot '
|
menu = ('[1]hot '
|
||||||
'[2]top '
|
'[2]top '
|
||||||
'[3]rising '
|
'[3]rising '
|
||||||
'[4]new '
|
'[4]new '
|
||||||
'[5]controversial').encode('utf-8')
|
'[5]controversial').encode('utf-8')
|
||||||
window.addstr.assert_any_call(0, 0, menu)
|
window.addstr.assert_any_call(0, 0, menu)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def test_subreddit_page_construct(reddit, terminal, config, oauth):
|
|||||||
# Banner
|
# Banner
|
||||||
menu = ('[1]hot '
|
menu = ('[1]hot '
|
||||||
'[2]top '
|
'[2]top '
|
||||||
'[3]rising '
|
'[3]rising '
|
||||||
'[4]new '
|
'[4]new '
|
||||||
'[5]controversial').encode('utf-8')
|
'[5]controversial').encode('utf-8')
|
||||||
window.addstr.assert_any_call(0, 0, menu)
|
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
|
# Banner shouldn't be drawn
|
||||||
menu = ('[1]hot '
|
menu = ('[1]hot '
|
||||||
'[2]top '
|
'[2]top '
|
||||||
'[3]rising '
|
'[3]rising '
|
||||||
'[4]new '
|
'[4]new '
|
||||||
'[5]controversial').encode('utf-8')
|
'[5]controversial').encode('utf-8')
|
||||||
with pytest.raises(AssertionError):
|
with pytest.raises(AssertionError):
|
||||||
|
|||||||
Reference in New Issue
Block a user