Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SystemMonitoring
Submodule SystemMonitoring added at 93769c
Binary file added __pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added __pycache__/apps.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os
import sys

# Get the parent directory of tests (project root)
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, project_root)
4 changes: 4 additions & 0 deletions tests/test_data_processing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def test_sample_data():
data = [1, 2, 3]
result = sum(data)
assert result == 6
17 changes: 17 additions & 0 deletions tests/test_endpoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from fastapi.testclient import TestClient
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from apps import app

client = TestClient(app)

def test_root_endpoint():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"message": "Hello World"} # matches your code

def test_health_endpoint():
response = client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "ok"} # matches your code
4 changes: 4 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def test_integration_example():
x = 5
y = 10
assert x + y == 15
Loading