From ccdd733121e9d72613a371584e334fbca52f938c Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 25 Dec 2023 10:48:22 +0100 Subject: [PATCH] Commit and legacy backpopulate pattern from unit test --- test/integration/test_display_applications.py | 1 + test/unit/data/test_galaxy_mapping.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/test_display_applications.py b/test/integration/test_display_applications.py index 41e82fd63b1..da79751480d 100644 --- a/test/integration/test_display_applications.py +++ b/test/integration/test_display_applications.py @@ -6,6 +6,7 @@ from .test_containerized_jobs import ContainerizedIntegrationTestCase class TestDisplayApplicationTestCase(ContainerizedIntegrationTestCase): + dataset_populator: DatasetPopulator container_type = "docker" def setUp(self): diff --git a/test/unit/data/test_galaxy_mapping.py b/test/unit/data/test_galaxy_mapping.py index 8e1ba80f6d0..b2ba36a4f6e 100644 --- a/test/unit/data/test_galaxy_mapping.py +++ b/test/unit/data/test_galaxy_mapping.py @@ -60,7 +60,7 @@ class BaseModelTestCase(TestCase): for arg in args: session.add(arg) if flush: - session.flush() + session.commit() if kwargs.get("expunge", not flush): cls.expunge() return arg # Return last or only arg. @@ -699,7 +699,7 @@ class TestMappings(BaseModelTestCase): self.persist(user, galaxy_session) assert user.current_galaxy_session == galaxy_session new_galaxy_session = model.GalaxySession() - new_galaxy_session.user = user + user.galaxy_sessions.append(new_galaxy_session) self.persist(user, new_galaxy_session) assert user.current_galaxy_session == new_galaxy_session