SIENTIAPDE-1318

Refactor app.py and enhance unit tests for better clarity and structure

- Updated `app.py` to improve async compatibility with a clearer comment.
- Added blank lines in `test_ingestor.py` for improved readability and organization of test cases.
This commit is contained in:
vitor-aignosi
2025-10-17 16:09:41 -03:00
parent 2fad392dcb
commit 4c3289647b
2 changed files with 5 additions and 2 deletions

View File

@@ -192,6 +192,7 @@ async def test_manage_leases_no_ingestor_manager(ingestor_manager_started):
assert await ingestor_manager_started.manage_leases(2, 2, 5) is None
@mark.asyncio
async def test_manage_leases_no_available_slots_no_extra_slots(ingestor_manager_started):
ingestor_manager_started.handle_acquired_tags = MagicMock()
@@ -294,6 +295,7 @@ async def test_loop_no_ingestor_manager(ingestor_manager_started):
assert await ingestor_manager_started.loop() is None
@mark.asyncio
async def test_update_ingestor_manager(ingestor_manager_started):
ingestor_manager_started.ingestor_manager.managed_tags = {
@@ -318,6 +320,7 @@ async def test_update_ingestor_manager(ingestor_manager_started):
[call('slot_to_update'), call('slot_to_delete')]
)
@mark.asyncio
async def test_update_ingestor_manager_no_ingestor_manager(ingestor_manager_started):
ingestor_manager_started.ingestor_manager = None