add flake8
This commit is contained in:
@ -1 +1 @@
|
||||
from ki import models, commands, routes
|
||||
from ki import models, commands, routes # noqa
|
||||
|
@ -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 = {}
|
||||
|
@ -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":
|
||||
|
Reference in New Issue
Block a user