Merge dev to main: Security improvements and comprehensive test infrastructure #39

Merged
jimmy merged 195 commits from dev into main 2026-04-08 01:42:27 +08:00
2 changed files with 56 additions and 0 deletions
Showing only changes of commit 01344e8b2d - Show all commits
+35
View File
@@ -0,0 +1,35 @@
"""
Basic diagnostic tests to validate test environment.
"""
import sys
import pytest
def test_python_version():
"""Verify Python version."""
assert sys.version_info >= (3, 10), f"Python version: {sys.version}"
def test_imports():
"""Verify all required modules can be imported."""
try:
import fastapi
import uvicorn
import docker
import httpx
import jwt
import passlib
import pyotp
import asyncssh
import pytest
import pytest_asyncio
import pytest_cov
import pytest_mock
assert True
except ImportError as e:
pytest.fail(f"Import failed: {e}")
def test_basic_math():
"""Sanity check that tests can run."""
assert 1 + 1 == 2
+21
View File
@@ -0,0 +1,21 @@
"""
Basic diagnostic tests to validate frontend test environment.
"""
import { describe, it, expect } from 'vitest';
describe('Basic Environment Tests', () => {
it('should run basic math', () => {
expect(1 + 1).toBe(2);
});
it('should have access to DOM APIs', () => {
expect(typeof document).toBe('object');
expect(typeof window).toBe('object');
});
it('should have localStorage mock', () => {
localStorage.setItem('test', 'value');
expect(localStorage.getItem('test')).toBe('value');
localStorage.removeItem('test');
});
});