From e367cb64e87dd4782e033756a84a3dc5d3eb62e9 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Tue, 2 Jul 2024 10:41:48 +0200 Subject: [PATCH] fix(test): Fix tests after renaming column --- backend/experiment/tests/test_admin_experiment.py | 8 ++++---- backend/experiment/tests/test_views.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/experiment/tests/test_admin_experiment.py b/backend/experiment/tests/test_admin_experiment.py index 1b638050a..53f1f0228 100644 --- a/backend/experiment/tests/test_admin_experiment.py +++ b/backend/experiment/tests/test_admin_experiment.py @@ -114,7 +114,7 @@ def setUp(self): self.admin = ExperimentAdmin(model=Experiment, admin_site=AdminSite ) - + def test_admin_export(self): response = self.admin.export(request, self.experiment) zip_buffer = BytesIO(response.content) @@ -225,7 +225,7 @@ def setUp(self): def test_related_series_with_series(self): series = ExperimentCollection.objects.create(name='Test Series') phase = Phase.objects.create( - name='Test Group', order=1, randomize=False, series=series, dashboard=True) + name='Test Group', index=1, randomize=False, series=series, dashboard=True) related_series = self.admin.related_series(phase) expected_url = reverse( "admin:experiment_experimentcollection_change", args=[series.pk]) @@ -235,14 +235,14 @@ def test_related_series_with_series(self): def test_experiments_with_no_experiments(self): series = ExperimentCollection.objects.create(name='Test Series') phase = Phase.objects.create( - name='Test Group', order=1, randomize=False, dashboard=True, series=series) + name='Test Group', index=1, randomize=False, dashboard=True, series=series) experiments = self.admin.experiments(phase) self.assertEqual(experiments, "No experiments") def test_experiments_with_experiments(self): series = ExperimentCollection.objects.create(name='Test Series') phase = Phase.objects.create( - name='Test Group', order=1, randomize=False, dashboard=True, series=series) + name='Test Group', index=1, randomize=False, dashboard=True, series=series) experiment1 = Experiment.objects.create(name='Experiment 1', slug='experiment-1') experiment2 = Experiment.objects.create(name='Experiment 2', slug='experiment-2') grouped_experiment1 = GroupedExperiment.objects.create(phase=phase, experiment=experiment1) diff --git a/backend/experiment/tests/test_views.py b/backend/experiment/tests/test_views.py index 9073e9fb7..1712d304c 100644 --- a/backend/experiment/tests/test_views.py +++ b/backend/experiment/tests/test_views.py @@ -33,7 +33,7 @@ def setUpTestData(cls): introductory_phase = Phase.objects.create( name='introduction', series=collection, - order=1 + index=1 ) cls.experiment1 = Experiment.objects.create( name='experiment1', slug='experiment1') @@ -44,7 +44,7 @@ def setUpTestData(cls): intermediate_phase = Phase.objects.create( name='intermediate', series=collection, - order=2 + index=2 ) cls.experiment2 = Experiment.objects.create( name='experiment2', slug='experiment2', theme_config=theme_config) @@ -61,7 +61,7 @@ def setUpTestData(cls): final_phase = Phase.objects.create( name='final', series=collection, - order=3 + index=3 ) cls.experiment4 = Experiment.objects.create( name='experiment4', slug='experiment4')