test(e2e): eliminate all legacy mocks and establish real-world sim suite

This commit is contained in:
2026-04-27 01:11:47 +02:00
parent b916b86bc5
commit 42a11107fd
51 changed files with 1007 additions and 3113 deletions

View File

@@ -1,9 +1,12 @@
import logging
import os
from unittest.mock import MagicMock
from unittest.mock import MagicMock, create_autospec
import pytest
from GramAddict.core.device_facade import DeviceFacade
from GramAddict.core.telepathic_engine import TelepathicEngine
def pytest_addoption(parser):
parser.addoption(
@@ -29,12 +32,6 @@ class MockConfigs:
self.args = args
from unittest.mock import MagicMock, create_autospec
from GramAddict.core.device_facade import DeviceFacade
from GramAddict.core.telepathic_engine import TelepathicEngine
def create_mock_device():
mock = create_autospec(DeviceFacade, instance=True)
mock.app_id = "com.instagram.android"
@@ -154,8 +151,8 @@ def reset_singletons():
@pytest.fixture(autouse=True)
def telepathic_mock(monkeypatch, request):
if request.config.getoption("--live"):
# TelepathicEngine is a singleton, allow it to run natively
if request.config.getoption("--live") or "e2e" in str(request.node.fspath):
# TelepathicEngine is a singleton, allow it to run natively in e2e or live mode
return None
import GramAddict.core.telepathic_engine