Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Merge branch 'SamTebbs33-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-lazar committed Aug 13, 2018
2 parents d2d7225 + 61853da commit 69cd9fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions rtv/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@
"""

FOOTER_SUBREDDIT = """
[?]Help [q]Quit [l]Comments [/]Prompt [u]Login [o]Open [c]Post [a/z]Vote
[?]Help [q]Quit [l]Comments [/]Prompt [u]Login [o]Open [c]Post [a/z]Vote [r]Refresh
"""

FOOTER_SUBMISSION = """
[?]Help [q]Quit [h]Return [space]Fold/Expand [o]Open [c]Comment [a/z]Vote
[?]Help [q]Quit [h]Return [space]Fold/Expand [o]Open [c]Comment [a/z]Vote [r]Refresh
"""

FOOTER_SUBSCRIPTION = """
Expand Down
18 changes: 7 additions & 11 deletions tests/test_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pytest

from rtv.submission_page import SubmissionPage
from rtv.docs import FOOTER_SUBMISSION

try:
from unittest import mock
Expand Down Expand Up @@ -58,17 +59,12 @@ def test_submission_page_construct(reddit, terminal, config, oauth):
window.addstr.assert_any_call(0, 0, title)

# Banner
menu = ('[1]hot '
'[2]top '
'[3]rising '
'[4]new '
'[5]controversial').encode('utf-8')
window.addstr.assert_any_call(0, 0, menu)

# Footer
text = ('[?]Help [q]Quit [h]Return [space]Fold/Expand [o]Open [c]Comment '
'[a/z]Vote'.encode('utf-8'))
window.addstr.assert_any_call(0, 0, text)
menu = '[1]hot [2]top [3]rising [4]new [5]controversial'
window.addstr.assert_any_call(0, 0, menu.encode('utf-8'))

# Footer - The text is longer than the default terminal width
text = FOOTER_SUBMISSION.strip()[:79]
window.addstr.assert_any_call(0, 0, text.encode('utf-8'))

# Submission
submission_data = page.content.get(-1)
Expand Down

0 comments on commit 69cd9fb

Please sign in to comment.