pytests: Add test for object required but path non existent

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
Monika Kairaityte 2024-05-26 21:07:18 +03:00
parent 040b73adab
commit 2e8ed2f924

View File

@ -352,6 +352,15 @@ class TestContainerToArgs(unittest.IsolatedAsyncioTestCase):
],
)
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()