from pathlib import Path
from fastapi.testclient import TestClient
from mocka.main import get_application
from mocka.configuration import Configuration, Server

client = TestClient(get_application(Configuration(Server("localhost", 8585))))


def test_post_octiva():
    file_path = Path("octiva/rails_0.jpg")
    response = client.get(f"/files/{file_path}")
    assert response.status_code == 200
    # temp_image_loc = Path(__file__).parent / Path("rail_image_test.jpg")
    # temp_image_loc.write_bytes(response.content)
