PEP8 fixes.
This commit is contained in:
@@ -11,7 +11,6 @@ import pytest
|
||||
from vcr import VCR
|
||||
from six.moves.urllib.parse import urlparse, parse_qs
|
||||
|
||||
from rtv.page import Page
|
||||
from rtv.oauth import OAuthHelper
|
||||
from rtv.config import Config
|
||||
from rtv.terminal import Terminal
|
||||
|
||||
@@ -173,7 +173,7 @@ def test_content_subreddit_load_more(reddit, terminal):
|
||||
assert content.get(50)['type'] == 'Submission'
|
||||
assert len(content._submission_data) == 51
|
||||
|
||||
for data in islice(content.iterate(0, 1, 70), 0, 50):
|
||||
for data in islice(content.iterate(0, 1), 0, 50):
|
||||
assert all(k in data for k in ('object', 'n_rows', 'offset', 'type',
|
||||
'index', 'title', 'split_title'))
|
||||
# All text should be converted to unicode by this point
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
||||
from tornado.web import Application
|
||||
from tornado.testing import AsyncHTTPTestCase
|
||||
from praw.errors import OAuthException
|
||||
@@ -155,6 +153,7 @@ def test_oauth_authorize(oauth, reddit, stdscr, refresh_token):
|
||||
stdscr.derwin().addstr.assert_called_with(1, 1, message)
|
||||
assert not oauth.config.save_refresh_token.called
|
||||
|
||||
|
||||
def test_oauth_clear_data(oauth):
|
||||
|
||||
oauth.config.refresh_token = 'secrettoken'
|
||||
|
||||
@@ -17,7 +17,7 @@ def test_page_logged_in(terminal):
|
||||
page.term = terminal
|
||||
|
||||
@logged_in
|
||||
def func(page):
|
||||
def func(_):
|
||||
raise RuntimeError()
|
||||
|
||||
# Logged in runs the function
|
||||
@@ -45,7 +45,7 @@ def test_page_unauthenticated(reddit, terminal, config, oauth):
|
||||
mock.patch.object(page, 'draw'):
|
||||
|
||||
# Loop
|
||||
def func(ch):
|
||||
def func(_):
|
||||
page.active = False
|
||||
with mock.patch.object(page, 'controller'):
|
||||
page.controller.trigger = mock.MagicMock(side_effect=func)
|
||||
|
||||
@@ -80,7 +80,7 @@ def test_submission_unauthenticated(submission_page, terminal):
|
||||
|
||||
def test_submission_open(submission_page, terminal):
|
||||
|
||||
# Open the selected link with the web browser
|
||||
# Open the selected link with the web browser
|
||||
with mock.patch.object(terminal, 'open_browser'):
|
||||
submission_page.controller.trigger(terminal.RETURN)
|
||||
assert terminal.open_browser.called
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from rtv.subreddit import SubredditPage
|
||||
from rtv.content import SubmissionContent
|
||||
|
||||
try:
|
||||
from unittest import mock
|
||||
|
||||
Reference in New Issue
Block a user