Skip to content

Commit

Permalink
fix(test): Fix tests after renaming column
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Jul 2, 2024
1 parent 6591c8d commit e367cb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions backend/experiment/tests/test_admin_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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])
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions backend/experiment/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
Expand All @@ -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')
Expand Down

0 comments on commit e367cb6

Please sign in to comment.