From 9c3cfe808e19ccb524e210a31aea409eee20eb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20G=C3=B3mez=20Mac=C3=ADas?= Date: Mon, 10 Jun 2024 12:24:44 +0200 Subject: [PATCH] linter --- tests/test_client.py | 16 ++++++++-------- tests/wsgi_app.py | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 25d1da1..6445463 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -27,7 +27,7 @@ from tests import wsgi_app -def new_client(httpserver, unused_apikey=''): +def new_client(httpserver, unused_apikey=""): return Client( "dummy_api_key", host="http://" + httpserver.host + ":" + str(httpserver.port), @@ -487,12 +487,12 @@ def test_user_headers(httpserver): def test_wsgi_app(httpserver, monkeypatch): app = wsgi_app.app - app.config.update({'TESTING': True}) + app.config.update({"TESTING": True}) client = app.test_client() - expected_response = {'data': { - 'id': 'google.com', - 'type': 'domain', - 'attributes': {'foo': 'foo'}, + expected_response = {"data": { + "id": "google.com", + "type": "domain", + "attributes": {"foo": "foo"}, }} @@ -501,8 +501,8 @@ def test_wsgi_app(httpserver, monkeypatch): headers={"X-Apikey": "dummy_api_key"} ).respond_with_json(expected_response) monkeypatch.setattr( - 'tests.wsgi_app.vt.Client', functools.partial(new_client, httpserver) + "tests.wsgi_app.vt.Client", functools.partial(new_client, httpserver) ) - response = client.get('/') + response = client.get("/") assert response.status_code == 200 assert response.json == expected_response diff --git a/tests/wsgi_app.py b/tests/wsgi_app.py index c91c247..35cc829 100644 --- a/tests/wsgi_app.py +++ b/tests/wsgi_app.py @@ -1,3 +1,5 @@ +"""Simulates a Flask app using vt-py to test non-async environments.""" + import flask import os import vt