Run flake8 across the entire code base (#163)
Also, make sure we're using a consistent version of flake8 in CI.
This commit is contained in:
parent
7102b4560b
commit
2c702b0a39
2 changed files with 8 additions and 5 deletions
7
tests.py
7
tests.py
|
@ -2,7 +2,6 @@ import re
|
|||
import time
|
||||
import unittest
|
||||
import uuid
|
||||
import json
|
||||
from unittest import TestCase
|
||||
from unittest import mock
|
||||
from urllib.parse import unquote
|
||||
|
@ -143,7 +142,11 @@ class SnapPassRoutesTestCase(TestCase):
|
|||
def test_set_password_json(self):
|
||||
with freeze_time("2020-05-08 12:00:00") as frozen_time:
|
||||
password = 'my name is my passport. verify me.'
|
||||
rv = self.app.post('/', headers={'Accept': 'application/json'}, data={'password': password, 'ttl': 'two weeks'})
|
||||
rv = self.app.post(
|
||||
'/',
|
||||
headers={'Accept': 'application/json'},
|
||||
data={'password': password, 'ttl': 'two weeks'},
|
||||
)
|
||||
|
||||
json_content = rv.get_json()
|
||||
key = re.search(r'https://localhost/([^"]+)', json_content['link']).group(1)
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -11,5 +11,5 @@ commands =
|
|||
|
||||
[testenv:flake8]
|
||||
commands =
|
||||
pip install flake8
|
||||
flake8 snappass/
|
||||
pip install -r dev-requirements.txt
|
||||
flake8
|
||||
|
|
Loading…
Reference in a new issue