From 3212b60d11c3a3cdea264350b0c095e6a6a9907a Mon Sep 17 00:00:00 2001 From: YolanFery Date: Fri, 22 Nov 2024 12:35:48 +0100 Subject: [PATCH] Fix test --- ...test_0049_pipelineversion_set_version_numbers.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hexa/pipelines/tests/migrations/test_0049_pipelineversion_set_version_numbers.py b/hexa/pipelines/tests/migrations/test_0049_pipelineversion_set_version_numbers.py index 2a19c0995..f02fdf096 100644 --- a/hexa/pipelines/tests/migrations/test_0049_pipelineversion_set_version_numbers.py +++ b/hexa/pipelines/tests/migrations/test_0049_pipelineversion_set_version_numbers.py @@ -18,8 +18,17 @@ def get_pipeline_version_model(self): def test_set_version_numbers(self): PipelineVersion = self.get_pipeline_version_model() pipeline = self.get_pipeline_model().objects.create(code=self.pipeline_code) - for date in ["2023-01-01", "2023-01-02", "2023-01-03"]: - PipelineVersion.objects.create(pipeline=pipeline, created_at=date) + for version_number, name, date in [ + (3, "3", "2023-01-01"), + (10, "10", "2023-01-02"), + (20, "20", "2023-01-03"), + ]: + PipelineVersion.objects.create( + pipeline=pipeline, + version_number=version_number, + name=name, + created_at=date, + ) self.migrator.migrate("pipelines", "0050_pipelineversion_set_version_numbers")