Skip to content

Commit

Permalink
Add output and user to valid directory test.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Aug 10, 2024
1 parent f287328 commit 5729c94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests-unit/server/routes/internal_routes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ async def test_list_files_valid_directory(aiohttp_client_factory, internal_route
assert len(data['files']) == 2
assert data['files'] == mock_file_list

# Check other valid directories
resp = await client.get('/files?directory=user')
assert resp.status == 200
resp = await client.get('/files?directory=output')
assert resp.status == 200

@pytest.mark.asyncio
async def test_list_files_invalid_directory(aiohttp_client_factory, internal_routes):
internal_routes.file_service.list_files = MagicMock(side_effect=ValueError("Invalid directory key"))
Expand Down

0 comments on commit 5729c94

Please sign in to comment.