-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move unit tests to dedicated folder (tests/unit)
Signed-off-by: Teo <[email protected]>
- Loading branch information
Showing
16 changed files
with
36 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import contextlib | ||
from typing import Iterator | ||
|
||
import pytest | ||
import requests_mock | ||
from pytest import Config, Session | ||
|
||
import agentops | ||
from agentops.singleton import clear_singletons | ||
from tests.fixtures.event import llm_event_spy | ||
from tests.fixtures.vcr import vcr_config | ||
|
||
# Common JWT tokens used across tests | ||
JWTS = ["some_jwt", "some_jwt2", "some_jwt3"] | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def setup_teardown(): | ||
""" | ||
Ensures that all agentops sessions are closed and singletons are cleared in-between tests | ||
""" | ||
clear_singletons() | ||
yield | ||
agentops.end_all_sessions() # teardown part | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def api_key() -> str: | ||
"""Standard API key for testing""" | ||
return "11111111-1111-4111-8111-111111111111" | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def base_url() -> str: | ||
"""Base API URL""" | ||
return "https://api.agentops.ai" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.