diff --git a/test/test_filesystem.py b/test/test_filesystem.py index e94e1b4b..fd675360 100644 --- a/test/test_filesystem.py +++ b/test/test_filesystem.py @@ -19,7 +19,7 @@ def test_read_file_missing_file(): with pytest.raises(MoulinetteError) as exception: read_file(bad_file) - translation = m18n.g('file_not_exist') + translation = m18n.g('file_not_exist', path=bad_file) expected_msg = translation.format(path=bad_file) assert expected_msg in str(exception) @@ -31,7 +31,7 @@ def test_read_file_cannot_read_ioerror(test_file, mocker): with pytest.raises(MoulinetteError) as exception: read_file(str(test_file)) - translation = m18n.g('cannot_open_file') + translation = m18n.g('cannot_open_file', file=str(test_file), error=error) expected_msg = translation.format(file=str(test_file), error=error) assert expected_msg in str(exception) @@ -49,7 +49,7 @@ def test_read_json_cannot_read(test_json, mocker): with pytest.raises(MoulinetteError) as exception: read_json(str(test_json)) - translation = m18n.g('corrupted_json') + translation = m18n.g('corrupted_json', ressource=str(test_json), error=error) expected_msg = translation.format(ressource=str(test_json), error=error) assert expected_msg in str(exception) @@ -75,7 +75,7 @@ def test_write_to_existing_file_bad_perms(test_file, mocker): with pytest.raises(MoulinetteError) as exception: write_to_file(str(test_file), 'yolo\nswag') - translation = m18n.g('cannot_write_file') + translation = m18n.g('cannot_write_file', file=str(test_file), error=error) expected_msg = translation.format(file=str(test_file), error=error) assert expected_msg in str(exception) @@ -140,7 +140,7 @@ def test_write_to_json_bad_perms(test_json, mocker): with pytest.raises(MoulinetteError) as exception: write_to_json(str(test_json), {'a': 1}) - translation = m18n.g('cannot_write_file') + translation = m18n.g('cannot_write_file', file=str(test_json), error=error) expected_msg = translation.format(file=str(test_json), error=error) assert expected_msg in str(exception) @@ -163,7 +163,7 @@ def test_remove_file_bad_perms(test_file, mocker): with pytest.raises(MoulinetteError) as exception: rm(str(test_file)) - translation = m18n.g('error_removing') + translation = m18n.g('error_removing', path=str(test_file), error=error) expected_msg = translation.format(path=str(test_file), error=error) assert expected_msg in str(exception)