Add comprehensive tests for dose tracking functionality

- Implemented `test_dose_parsing_simple.py` to validate the dose parsing workflow.
- Created `test_dose_save.py` to verify the saving functionality of dose tracking.
- Added `test_dose_save_simple.py` for programmatic testing of dose saving without UI interaction.
- Developed `test_final_workflow.py` to test the complete dose tracking workflow, ensuring doses are preserved during edits.
- Enhanced `conftest.py` with a mock pathology manager for testing.
- Updated `test_data_manager.py` to include pathology manager in DataManager tests and ensure compatibility with new features.
This commit is contained in:
William Valentin
2025-07-31 09:50:45 -07:00
parent b8600ae57a
commit c755f0affc
22 changed files with 2801 additions and 394 deletions

View File

@@ -84,6 +84,17 @@ def mock_medicine_manager():
return mock_manager
@pytest.fixture
def mock_pathology_manager():
"""Create a mock pathology manager with default pathologies for testing."""
mock_manager = Mock()
# Default pathologies matching the original system
mock_manager.get_pathology_keys.return_value = ["depression", "anxiety", "sleep", "appetite"]
return mock_manager
@pytest.fixture
def sample_data():
"""Sample data for testing."""