From b6d91a7ff377797c43441b1efb4a619bba3e032a Mon Sep 17 00:00:00 2001 From: Helena Adamkova <58051865+Ellenn-A@users.noreply.github.com> Date: Mon, 20 May 2024 13:31:59 +0100 Subject: [PATCH] formatted imports --- app/main.py | 3 ++- app/routes/posts.py | 10 +++++----- tests/__init__.py | 4 ++-- tests/conftest.py | 5 +++-- tests/test_drcp_event_handler.py | 3 ++- tests/test_post_query.py | 3 ++- tests/test_receive_response.py | 3 ++- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/main.py b/app/main.py index 4e0f733..d974b9c 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,7 @@ from fastapi import FastAPI from routes import router as api_router - + + def get_application() -> FastAPI: """ Controller to setup the application and return an Application diff --git a/app/routes/posts.py b/app/routes/posts.py index a46f103..feaf616 100644 --- a/app/routes/posts.py +++ b/app/routes/posts.py @@ -1,12 +1,12 @@ -from fastapi import APIRouter,HTTPException -from typing import Optional, List, Any from datetime import datetime from enum import IntEnum, StrEnum +from typing import Any, List, Optional + +import httpx +from fastapi import APIRouter, HTTPException from fastapi.responses import JSONResponse from pydantic import BaseModel -import httpx -import requests -from uagents import Model +from uagents import Model veritableUrl = "http://localhost:3010" peerUrl="http://localhost:3001/api" diff --git a/tests/__init__.py b/tests/__init__.py index 15eaebf..bac425e 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -import sys import os +import sys -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../app"))) \ No newline at end of file +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../app"))) diff --git a/tests/conftest.py b/tests/conftest.py index e00eae3..d6fed8c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,9 +1,10 @@ import pytest -from fastapi import FastAPI -from asgi_lifespan import LifespanManager import pytest_asyncio +from asgi_lifespan import LifespanManager +from fastapi import FastAPI from httpx import AsyncClient + @pytest.fixture def app() -> FastAPI: """ diff --git a/tests/test_drcp_event_handler.py b/tests/test_drcp_event_handler.py index da60b3c..bb82f3b 100644 --- a/tests/test_drcp_event_handler.py +++ b/tests/test_drcp_event_handler.py @@ -1,6 +1,7 @@ +import pytest from fastapi import FastAPI, status from httpx import AsyncClient -import pytest + pytestmark = pytest.mark.asyncio diff --git a/tests/test_post_query.py b/tests/test_post_query.py index 30e5f2f..d6328d9 100644 --- a/tests/test_post_query.py +++ b/tests/test_post_query.py @@ -1,6 +1,7 @@ +import pytest from fastapi import FastAPI, status from httpx import AsyncClient -import pytest + pytestmark = pytest.mark.asyncio diff --git a/tests/test_receive_response.py b/tests/test_receive_response.py index 81f00a2..fa852ab 100644 --- a/tests/test_receive_response.py +++ b/tests/test_receive_response.py @@ -1,6 +1,7 @@ +import pytest from fastapi import FastAPI, status from httpx import AsyncClient -import pytest + pytestmark = pytest.mark.asyncio