Skip to content

Commit 7cd46e6

Browse files
committed
Fix properties when deploying #201
1 parent d4f2708 commit 7cd46e6

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

pyartifactory/objects/artifact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def deploy(
100100
else:
101101
properties_param_str = ""
102102
if properties is not None:
103-
properties_param_str = self._format_properties(properties)
103+
properties_param_str = ";".join(f"{k}={value}" for k, values in properties.items() for value in values)
104104
route = ";".join(s for s in [artifact_folder.as_posix(), properties_param_str] if s)
105105
artifact_check_sums = Checksums.generate(local_file)
106106
headers = {

tests/test_artifacts.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,9 @@ def test_deploy_artifact_with_properties_success():
464464

465465
@responses.activate
466466
def test_deploy_artifact_with_multiple_properties_success():
467-
properties_param_str = ""
468-
for k, v in ARTIFACT_MULTIPLE_PROPERTIES.properties.items():
469-
values_str = ",".join(list(map(urllib.parse.quote, v)))
470-
properties_param_str += f"{k}={values_str};"
467+
properties_param_str = ";".join(
468+
f"{k}={value}" for k, values in ARTIFACT_MULTIPLE_PROPERTIES.properties.items() for value in values
469+
)
471470
responses.add(
472471
responses.PUT,
473472
f"{URL}/{ARTIFACT_PATH};{properties_param_str.rstrip(';')}",

0 commit comments

Comments
 (0)