diff --git a/test/unit/data/test_galaxy_mapping.py b/test/unit/data/test_galaxy_mapping.py index 20822dc70222..0dae47177a0e 100644 --- a/test/unit/data/test_galaxy_mapping.py +++ b/test/unit/data/test_galaxy_mapping.py @@ -56,12 +56,12 @@ def setUpClass(cls): @classmethod def persist(cls, *args, **kwargs): session = cls.session() - flush = kwargs.get("flush", True) + commit = kwargs.get("commit", True) for arg in args: session.add(arg) - if flush: - session.flush() - if kwargs.get("expunge", not flush): + if commit: + session.commit() + if kwargs.get("expunge", not commit): cls.expunge() return arg # Return last or only arg. @@ -255,7 +255,7 @@ def test_collection_get_interface(self): model.DatasetCollectionElement(collection=c1, element=d1, element_identifier=f"{i}", element_index=i) for i in range(elements) ] - self.persist(u, h1, d1, c1, *dces, flush=False, expunge=False) + self.persist(u, h1, d1, c1, *dces, commit=False, expunge=False) self.model.session.flush() for i in range(elements): assert c1[i] == dces[i]