(tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
| 75 | |
| 76 | |
| 77 | def test_get_file_auto_object_store(tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch): |
| 78 | with patch('composer.utils.file_helpers.S3ObjectStore', DummyObjectStore): |
| 79 | object_store = DummyObjectStore(pathlib.Path('my-test-bucket')) |
| 80 | with open(str(tmp_path / 'test-file.txt'), 'w') as _txt_file: |
| 81 | _txt_file.write('testing') |
| 82 | object_store.upload_object('test-file.txt', str(tmp_path / 'test-file.txt')) |
| 83 | get_file(f's3://my-test-bucket/test-file.txt', str(tmp_path / 'loaded-test-file.txt')) |
| 84 | |
| 85 | with open(str(tmp_path / 'loaded-test-file.txt')) as _txt_file: |
| 86 | loaded_content = _txt_file.read() |
| 87 | |
| 88 | assert loaded_content.startswith('testing') |
| 89 | |
| 90 | |
| 91 | def test_get_file_object_store_with_symlink(tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch): |
nothing calls this directly
no test coverage detected