Skip to content

Commit 02d3b38

Browse files
authored
[DPE-1627] Implement UUID in naming convention for updated collection (#1224)
* Implement UUID in naming convention for updated collection * Implement the same changes to the async test
1 parent d0f3646 commit 02d3b38

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/integration/synapseclient/models/async/test_dataset_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ async def test_dataset_collection_versioning(self, project_model: Project) -> No
655655
await collection.snapshot_async(synapse_client=self.syn)
656656

657657
# AND I update the collection and make version 2
658-
collection.name = "Updated collection"
658+
collection.name = f"Updated collection {uuid.uuid4()}"
659659
collection.add_item(dataset2)
660660
await collection.store_async(synapse_client=self.syn)
661661
await collection.snapshot_async(synapse_client=self.syn)
@@ -672,6 +672,6 @@ async def test_dataset_collection_versioning(self, project_model: Project) -> No
672672
synapse_client=self.syn
673673
)
674674
assert len(v2.items) == 2
675-
assert v2.name == "Updated collection"
675+
assert v2.name == collection.name
676676
assert EntityRef(id=dataset1.id, version=dataset1.version_number) in v2.items
677677
assert EntityRef(id=dataset2.id, version=dataset2.version_number) in v2.items

tests/integration/synapseclient/models/synchronous/test_dataset.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ async def test_dataset_collection_columns(self, project_model: Project) -> None:
610610

611611
async def test_dataset_collection_versioning(self, project_model: Project) -> None:
612612
"""Test versioning of DatasetCollections"""
613+
613614
# GIVEN a DatasetCollection and datasets
614615
dataset1 = await self.create_dataset(project_model)
615616
dataset2 = await self.create_dataset(project_model)
@@ -627,7 +628,7 @@ async def test_dataset_collection_versioning(self, project_model: Project) -> No
627628
collection.snapshot(synapse_client=self.syn)
628629

629630
# AND I update the collection and make version 2
630-
collection.name = "Updated collection"
631+
collection.name = f"Updated collection {uuid.uuid4()}"
631632
collection.add_item(dataset2)
632633
collection.store(synapse_client=self.syn)
633634
collection.snapshot(synapse_client=self.syn)
@@ -644,6 +645,6 @@ async def test_dataset_collection_versioning(self, project_model: Project) -> No
644645
synapse_client=self.syn
645646
)
646647
assert len(v2.items) == 2
647-
assert v2.name == "Updated collection"
648+
assert v2.name == collection.name
648649
assert EntityRef(id=dataset1.id, version=dataset1.version_number) in v2.items
649650
assert EntityRef(id=dataset2.id, version=dataset2.version_number) in v2.items

0 commit comments

Comments
 (0)