Fixing test
This commit is contained in:
@@ -9,6 +9,7 @@ from collections import OrderedDict
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from rtv.submission_page import SubmissionPage
|
from rtv.submission_page import SubmissionPage
|
||||||
|
from rtv.docs import FOOTER_SUBMISSION
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
@@ -58,17 +59,12 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
|
|||||||
window.addstr.assert_any_call(0, 0, title)
|
window.addstr.assert_any_call(0, 0, title)
|
||||||
|
|
||||||
# Banner
|
# Banner
|
||||||
menu = ('[1]hot '
|
menu = '[1]hot [2]top [3]rising [4]new [5]controversial'
|
||||||
'[2]top '
|
window.addstr.assert_any_call(0, 0, menu.encode('utf-8'))
|
||||||
'[3]rising '
|
|
||||||
'[4]new '
|
|
||||||
'[5]controversial').encode('utf-8')
|
|
||||||
window.addstr.assert_any_call(0, 0, menu)
|
|
||||||
|
|
||||||
# Footer
|
# Footer - The text is longer than the default terminal width
|
||||||
text = ('[?]Help [q]Quit [h]Return [space]Fold/Expand [o]Open [c]Comment '
|
text = FOOTER_SUBMISSION.strip()[:79]
|
||||||
'[a/z]Vote [r]Refresh'.encode('utf-8'))
|
window.addstr.assert_any_call(0, 0, text.encode('utf-8'))
|
||||||
window.addstr.assert_any_call(0, 0, text)
|
|
||||||
|
|
||||||
# Submission
|
# Submission
|
||||||
submission_data = page.content.get(-1)
|
submission_data = page.content.get(-1)
|
||||||
|
|||||||
Reference in New Issue
Block a user