From 1ac4de4da9705bf4b8af99bb1879c7eb84173fee Mon Sep 17 00:00:00 2001 From: Alexander Myasoedov Date: Mon, 16 Dec 2024 15:35:14 +0200 Subject: [PATCH] feat(add file spec): --- agentic_security/test_lib.py | 4 ++-- agentic_security/test_spec_assets.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/agentic_security/test_lib.py b/agentic_security/test_lib.py index 4458e03..9e4d95b 100644 --- a/agentic_security/test_lib.py +++ b/agentic_security/test_lib.py @@ -4,11 +4,11 @@ import time import pytest -from agentic_security.lib import AgenticSecurity import agentic_security.test_spec_assets as test_spec_assets +from agentic_security.lib import AgenticSecurity -@pytest.fixture(scope="session") +@pytest.fixture(scope="module") def test_server(request): # Start server process server = subprocess.Popen( diff --git a/agentic_security/test_spec_assets.py b/agentic_security/test_spec_assets.py index 96efca6..92d3432 100644 --- a/agentic_security/test_spec_assets.py +++ b/agentic_security/test_spec_assets.py @@ -66,4 +66,15 @@ Content-Type: application/json """ -ALL = [SAMPLE_SPEC, IMAGE_SPEC, MULTI_IMAGE_SPEC] +FILE_SPEC = """ +POST http://0.0.0.0:9094/v1/self-probe +Authorization: Bearer $GROQ_API_KEY +Content-Type: multipart/form-data + +{ + "file": "@./sample_audio.m4a", + "model": "whisper-large-v3" +} +""" + +ALL = [SAMPLE_SPEC, IMAGE_SPEC, MULTI_IMAGE_SPEC, FILE_SPEC]