Merge dev to main: Security improvements and comprehensive test infrastructure #39
@@ -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
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user