Skip to content

Commit

Permalink
pytests: Add test for object required but path non existent
Browse files Browse the repository at this point in the history
  • Loading branch information
mokibit authored and p12tic committed May 28, 2024
1 parent 0214314 commit e82bc21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pytests/test_container_to_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ async def test_env_file_obj_required(self):
],
)

async def test_env_file_obj_required_non_existent_path(self):
c = create_compose_mock()

cnt = get_minimal_container()
cnt['env_file'] = {'path': 'not-exists', 'required': True}

with self.assertRaises(ValueError):
await container_to_args(c, cnt)

async def test_env_file_obj_optional(self):
c = create_compose_mock()

Expand Down

0 comments on commit e82bc21

Please sign in to comment.