forked from PrefectHQ/prefect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
azure_storage_container
to Azure filesystem (PrefectHQ#11784)
Co-authored-by: Thomas Frederik Hoeck <[email protected]> Co-authored-by: nate nowack <[email protected]> Co-authored-by: nate nowack <[email protected]>
- Loading branch information
1 parent
090d44d
commit c03fe84
Showing
2 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -709,3 +709,28 @@ def test_init_with_anon(self, monkeypatch): | |
"anon": False, | ||
}, | ||
) | ||
|
||
def test_init_with_container(self, monkeypatch): | ||
remote_storage_mock = MagicMock() | ||
monkeypatch.setattr("prefect.filesystems.RemoteFileSystem", remote_storage_mock) | ||
Azure( | ||
azure_storage_tenant_id="tenant", | ||
azure_storage_account_name="account", | ||
azure_storage_client_id="client_id", | ||
azure_storage_account_key="key", | ||
azure_storage_client_secret="secret", | ||
azure_storage_container="container", | ||
bucket_path="bucket", | ||
azure_storage_anon=False, | ||
).filesystem | ||
remote_storage_mock.assert_called_once_with( | ||
basepath="az://[email protected]/bucket", | ||
settings={ | ||
"account_name": "account", | ||
"account_key": "key", | ||
"tenant_id": "tenant", | ||
"client_id": "client_id", | ||
"client_secret": "secret", | ||
"anon": False, | ||
}, | ||
) |