add flake8

This commit is contained in:
2021-06-15 18:08:57 +02:00
parent 375f618e0d
commit b0950e58cc
8 changed files with 60 additions and 22 deletions

View File

@ -1 +1 @@
from ki import models, commands, routes
from ki import models, commands, routes # noqa

View File

@ -46,8 +46,8 @@ def handle_completion_request(model, key):
query = query.filter(model.name.startswith(request.args.get("search")))
results = query.order_by(model.name) \
.limit(10) \
.all()
.limit(10) \
.all()
api_results = models_to_list(results)
response_data = {}

View File

@ -20,13 +20,15 @@ class TestSkillsEndpoint(unittest.TestCase):
def test_get_skills1(self):
response = self.client.get("/skills?search=p")
self.assertEqual(response.status_code, 200)
self.assertEqual( \
{"skills": [ \
{"id": 1, "name": "PHP"}, \
{"id": 3, "name": "Python"}
]}, \
response.json \
)
self.assertEqual(
{
"skills": [
{"id": 1, "name": "PHP"},
{"id": 3, "name": "Python"}
]
},
response.json
)
if __name__ == "main":