diff --git a/SystemMonitoring b/SystemMonitoring new file mode 160000 index 0000000..93769c8 --- /dev/null +++ b/SystemMonitoring @@ -0,0 +1 @@ +Subproject commit 93769c8898407deda1c4b5ac07672efbaa60c918 diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..5e5f16f Binary files /dev/null and b/__pycache__/__init__.cpython-312.pyc differ diff --git a/__pycache__/apps.cpython-312.pyc b/__pycache__/apps.cpython-312.pyc new file mode 100644 index 0000000..7ef52f2 Binary files /dev/null and b/__pycache__/apps.cpython-312.pyc differ diff --git a/tests/__pycache__/conftest.cpython-312-pytest-8.4.2.pyc b/tests/__pycache__/conftest.cpython-312-pytest-8.4.2.pyc new file mode 100644 index 0000000..7d59b6b Binary files /dev/null and b/tests/__pycache__/conftest.cpython-312-pytest-8.4.2.pyc differ diff --git a/tests/__pycache__/test_data_processing.cpython-312-pytest-8.4.2.pyc b/tests/__pycache__/test_data_processing.cpython-312-pytest-8.4.2.pyc new file mode 100644 index 0000000..91c8472 Binary files /dev/null and b/tests/__pycache__/test_data_processing.cpython-312-pytest-8.4.2.pyc differ diff --git a/tests/__pycache__/test_endpoints.cpython-312-pytest-8.4.2.pyc b/tests/__pycache__/test_endpoints.cpython-312-pytest-8.4.2.pyc new file mode 100644 index 0000000..509d6c4 Binary files /dev/null and b/tests/__pycache__/test_endpoints.cpython-312-pytest-8.4.2.pyc differ diff --git a/tests/__pycache__/test_integration.cpython-312-pytest-8.4.2.pyc b/tests/__pycache__/test_integration.cpython-312-pytest-8.4.2.pyc new file mode 100644 index 0000000..36bac02 Binary files /dev/null and b/tests/__pycache__/test_integration.cpython-312-pytest-8.4.2.pyc differ diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..85d7212 --- /dev/null +++ b/tests/conftest.py @@ -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) \ No newline at end of file diff --git a/tests/test_data_processing.py b/tests/test_data_processing.py new file mode 100644 index 0000000..87983b5 --- /dev/null +++ b/tests/test_data_processing.py @@ -0,0 +1,4 @@ +def test_sample_data(): + data = [1, 2, 3] + result = sum(data) + assert result == 6 diff --git a/tests/test_endpoints.py b/tests/test_endpoints.py new file mode 100644 index 0000000..d287c1c --- /dev/null +++ b/tests/test_endpoints.py @@ -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 diff --git a/tests/test_integration.py b/tests/test_integration.py new file mode 100644 index 0000000..4911aeb --- /dev/null +++ b/tests/test_integration.py @@ -0,0 +1,4 @@ +def test_integration_example(): + x = 5 + y = 10 + assert x + y == 15