improved redaction, send system info during model config load telemetry, etc.

This commit is contained in:
Dan Saunders
2025-02-24 15:39:02 +00:00
parent 49ac79ed1e
commit 5afad670da
5 changed files with 47 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
"""
shared pytest fixtures
"""
"""Shared pytest fixtures"""
import functools
import importlib
import shutil
@@ -171,3 +170,9 @@ def cleanup_monkeypatches():
module_globals = module_name_tuple[1]
for module_global in module_globals:
globals().pop(module_global, None)
@pytest.fixture(autouse=True)
def disable_telemetry(monkeypatch):
monkeypatch.setenv("AXOLOTL_DO_NOT_TRACK", "1")
yield

View File

@@ -0,0 +1,9 @@
"""Shared pytest fixtures for telemetry tests."""
import pytest
@pytest.fixture(autouse=True)
def disable_telemetry(monkeypatch):
monkeypatch.delenv("AXOLOTL_DO_NOT_TRACK")
yield

View File

@@ -146,7 +146,7 @@ def test_is_whitelisted(manager, mock_whitelist):
def test_system_info_collection(manager):
"""Test system information collection"""
system_info = manager.system_info
system_info = manager._get_system_info()
# Check essential keys
assert "os" in system_info