mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
* test: clean flake8 config root clutter * test: pre-commit: add isort Compatible with black (see https://github.com/timothycrosley/isort/issues/694) * lint: reorder imports * lint: more complex imports * lint: fix deepsource * config: isort: add first party dvc * tests: restyled: add isort * temp commit to revert before merge * Revert "temp commit to revert before merge" This reverts commit 11db0fd8e95fe891597cbb9bf804480909b19e24.
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
from dvc.remote.azure import AzureRemote
|
|
|
|
container_name = "container-name"
|
|
connection_string = (
|
|
"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;"
|
|
"AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsu"
|
|
"Fq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;"
|
|
"BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
|
|
)
|
|
|
|
|
|
def test_init_compat(dvc):
|
|
url = (
|
|
"azure://ContainerName={container_name};{connection_string}"
|
|
).format(
|
|
container_name=container_name, connection_string=connection_string,
|
|
)
|
|
config = {"url": url}
|
|
remote = AzureRemote(dvc, config)
|
|
assert remote.path_info == "azure://" + container_name
|
|
assert remote.connection_string == connection_string
|
|
|
|
|
|
def test_init(dvc):
|
|
prefix = "some/prefix"
|
|
url = "azure://{}/{}".format(container_name, prefix)
|
|
config = {"url": url, "connection_string": connection_string}
|
|
remote = AzureRemote(dvc, config)
|
|
assert remote.path_info == url
|
|
assert remote.connection_string == connection_string
|