mirror of
https://github.com/arc53/DocsGPT.git
synced 2026-05-06 16:25:04 +00:00
fix: tests
This commit is contained in:
@@ -2,7 +2,6 @@ import logging
|
||||
from application.core.url_validation import SSRFError, validate_url
|
||||
from application.parser.remote.base import BaseRemote
|
||||
from application.parser.schema.base import Document
|
||||
from application.core.url_validation import validate_url, SSRFError
|
||||
from langchain_community.document_loaders import WebBaseLoader
|
||||
|
||||
headers = {
|
||||
|
||||
@@ -233,7 +233,7 @@ class TestListModelsPgConn:
|
||||
)
|
||||
assert resp.status_code == 401
|
||||
|
||||
def test_returns_user_agents_for_valid_key(self, pg_conn):
|
||||
def test_returns_agent_for_valid_key(self, pg_conn):
|
||||
from application.storage.db.repositories.agents import AgentsRepository
|
||||
|
||||
app = _build_app()
|
||||
@@ -250,9 +250,8 @@ class TestListModelsPgConn:
|
||||
assert resp.status_code == 200
|
||||
data = resp.get_json()
|
||||
assert data["object"] == "list"
|
||||
# Both agents for user u-m should be listed
|
||||
names = {m["name"] for m in data["data"]}
|
||||
assert "A1" in names and "A2" in names
|
||||
assert names == {"A1"}
|
||||
|
||||
def test_db_error_returns_500(self):
|
||||
app = _build_app()
|
||||
|
||||
Reference in New Issue
Block a user