Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmacias95 committed Jun 10, 2024
1 parent 5649e4d commit 9c3cfe8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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"},
}}


Expand All @@ -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
2 changes: 2 additions & 0 deletions tests/wsgi_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Simulates a Flask app using vt-py to test non-async environments."""

import flask
import os
import vt
Expand Down

0 comments on commit 9c3cfe8

Please sign in to comment.