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
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
  • Loading branch information
mokibit committed May 28, 2024
1 parent 8b36c7e commit 9242108
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 9242108

Please sign in to comment.