fixes deploy
This commit is contained in:
parent
d61e29bcac
commit
67806e5323
3 changed files with 10 additions and 3 deletions
|
|
@ -41,6 +41,7 @@ import psycopg2.errors
|
|||
import pytest
|
||||
from pydantic import Field
|
||||
|
||||
import modules.connectors.connectorDbPostgre as _pgmod
|
||||
from modules.connectors.connectorDbPostgre import (
|
||||
DatabaseConnector,
|
||||
_PoolRegistry,
|
||||
|
|
@ -149,6 +150,7 @@ def liveConnector():
|
|||
adminConn.close()
|
||||
|
||||
closeAllPools()
|
||||
_pgmod._shuttingDown = False
|
||||
|
||||
connector = DatabaseConnector(
|
||||
dbHost=host,
|
||||
|
|
@ -164,6 +166,7 @@ def liveConnector():
|
|||
|
||||
# Teardown: tear pools down, then drop the DB.
|
||||
closeAllPools()
|
||||
_pgmod._shuttingDown = False
|
||||
adminConn = psycopg2.connect(
|
||||
host=host, port=port, database="postgres", user=user, password=password
|
||||
)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ class TestGetChildrenForParents(unittest.TestCase):
|
|||
self.assertEqual(result["bogus|key"], [])
|
||||
|
||||
def test_top_level_emits_personal_root_first(self):
|
||||
with patch("modules.interfaces.interfaceDbApp.getRootInterface") as mockRoot:
|
||||
with patch("modules.interfaces.interfaceDbApp.getRootInterface") as mockRoot, \
|
||||
patch("modules.serviceCenter.services.serviceKnowledge._buildTree._personalRootChildrenNodes", return_value=[]), \
|
||||
patch("modules.security.rbacCatalog.getCatalogService"):
|
||||
rootIf = MagicMock()
|
||||
rootIf.db.getRecordset.return_value = []
|
||||
rootIf.getUserMandates.return_value = []
|
||||
|
|
@ -151,7 +153,8 @@ class TestGetChildrenForParents(unittest.TestCase):
|
|||
|
||||
def test_top_level_emits_mandate_groups_inline(self):
|
||||
with patch("modules.interfaces.interfaceDbApp.getRootInterface") as mockRoot, \
|
||||
patch("modules.security.rbacCatalog.getCatalogService") as mockCatalog:
|
||||
patch("modules.security.rbacCatalog.getCatalogService") as mockCatalog, \
|
||||
patch("modules.serviceCenter.services.serviceKnowledge._buildTree._personalRootChildrenNodes", return_value=[]):
|
||||
rootIf = MagicMock()
|
||||
rootIf.db.getRecordset.return_value = []
|
||||
userMandate = MagicMock()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ asked for the closing balance per period).
|
|||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from unittest.mock import MagicMock
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -228,6 +228,7 @@ def _buildRegistryWithMockProvider():
|
|||
provider.browseTable.return_value = {"rows": [], "total": 0, "limit": 50, "offset": 0}
|
||||
provider.queryTable.return_value = {"rows": [], "total": 0, "limit": 50, "offset": 0}
|
||||
provider.aggregateTable.return_value = {"rows": [], "aggregate": "SUM", "field": "x"}
|
||||
provider.finalizeRowsAsync = AsyncMock(return_value=[])
|
||||
registry = _buildSubAgentTools(
|
||||
provider=provider,
|
||||
featureInstanceId="fi-test",
|
||||
|
|
|
|||
Loading…
Reference in a new issue