From 2c702b0a39227bc02cce60ee941e6b3c400fc2dc Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Tue, 17 May 2022 11:41:01 -0700 Subject: [PATCH] Run flake8 across the entire code base (#163) Also, make sure we're using a consistent version of flake8 in CI. --- tests.py | 9 ++++++--- tox.ini | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests.py b/tests.py index 3994793..1c385f9 100644 --- a/tests.py +++ b/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 @@ -139,11 +138,15 @@ class SnapPassRoutesTestCase(TestCase): frozen_time.move_to("2020-05-22 12:00:00") self.assertIsNone(snappass.get_password(key)) - + 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) diff --git a/tox.ini b/tox.ini index 616303d..17d4d79 100644 --- a/tox.ini +++ b/tox.ini @@ -11,5 +11,5 @@ commands = [testenv:flake8] commands = - pip install flake8 - flake8 snappass/ + pip install -r dev-requirements.txt + flake8