fix: improve maintenance and synchronize live conversations
This commit is contained in:
1 parent
bb541bd212
commit
ef86a5d3af
297 files changed
+2983
-1274
No files matched your search
@@ -15,7 +15,7 @@ limitations under the License.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from unittest.mock import MagicMock, patch, ANY, AsyncMock
|
||||
from unittest.mock import MagicMock, patch, AsyncMock
|
||||
from fastapi import HTTPException
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlalchemy.orm import Session
|
||||
@@ -24,20 +24,12 @@ import json
|
||||
import hmac
|
||||
import hashlib
|
||||
import base64
|
||||
from urllib.parse import urlencode, quote
|
||||
from urllib.parse import quote
|
||||
from datetime import datetime, timezone
|
||||
from app.models.schemas.shopify.agent_shopify_config import AgentShopifyConfig
|
||||
from app.models.shopify.agent_shopify_config import AgentShopifyConfig
|
||||
|
||||
from app.main import app
|
||||
from app.api.shopify import router
|
||||
from app.services.shopify_helper_service import ShopifyHelperService
|
||||
from app.repositories.shopify_shop_repository import ShopifyShopRepository
|
||||
from app.repositories.agent_shopify_config_repository import AgentShopifyConfigRepository
|
||||
from app.models.shopify import ShopifyShop
|
||||
from app.models.schemas.shopify import ShopifyShopCreate, ShopifyShopUpdate
|
||||
from app.models.schemas.shopify import AgentShopifyConfigBase, AgentShopifyConfigCreate, AgentShopifyConfigUpdate
|
||||
from app.services.shopify import ShopifyService
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -334,7 +326,7 @@ async def test_delete_shop(mock_shop_repo, mock_config_repo, mock_db, mock_organ
|
||||
async def test_check_connection_connected(mock_shop_repo, mock_db, mock_organization, mock_user):
|
||||
"""Test the check_connection endpoint when connected"""
|
||||
# Arrange
|
||||
org_id = str(mock_organization.id)
|
||||
str(mock_organization.id)
|
||||
|
||||
mock_shop_repo_instance = MagicMock()
|
||||
mock_shop_repo.return_value = mock_shop_repo_instance
|
||||
@@ -362,7 +354,7 @@ async def test_check_connection_connected(mock_shop_repo, mock_db, mock_organiza
|
||||
async def test_check_connection_not_connected(mock_shop_repo, mock_db, mock_organization, mock_user):
|
||||
"""Test the check_connection endpoint when not connected"""
|
||||
# Arrange
|
||||
org_id = str(mock_organization.id)
|
||||
str(mock_organization.id)
|
||||
|
||||
mock_shop_repo_instance = MagicMock()
|
||||
mock_shop_repo.return_value = mock_shop_repo_instance
|
||||
|
||||
Reference in new issue
Block a user