Skip to content

Commit

Permalink
Limit widget to supported widget types in test
Browse files Browse the repository at this point in the history
  • Loading branch information
thenav56 committed Nov 7, 2023
1 parent 42da67d commit 55ded41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/analysis_framework/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Widget,
Filter,
)
from .widgets.store import widget_store


class AnalysisFrameworkFactory(DjangoModelFactory):
Expand All @@ -28,7 +29,7 @@ class Meta:
class WidgetFactory(DjangoModelFactory):
title = factory.Sequence(lambda n: f'Widget-{n}')
key = factory.Sequence(lambda n: f'widget-key-{n}')
widget_id = fuzzy.FuzzyChoice(Widget.WidgetType.choices, getter=lambda c: c[0])
widget_id = fuzzy.FuzzyChoice(widget_store.keys())
properties = {}
version = 1

Expand Down

0 comments on commit 55ded41

Please sign in to comment.