Skip to content

Commit

Permalink
Fix test so that we actually save dummy data - error crept in on rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmenezes0 committed Apr 2, 2024
1 parent 9e61fb7 commit 24f165e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class Params:
@factory.post_generation
def with_answer(question, creation_strategy, value, **kwargs):
if value is True:
AnswerFactory(question=question, with_multiple_choice=kwargs.get("with_multiple_choice"))
question.save()
answer = AnswerFactory(question=question, with_multiple_choice=kwargs.get("with_multiple_choice"))
answer.save()

@factory.post_generation
def with_multiple_choice(question, creation_strategy, value, **kwargs):
Expand All @@ -104,12 +104,12 @@ def with_multiple_choice(question, creation_strategy, value, **kwargs):
@factory.post_generation
def with_free_text(question, creation_strategy, value, **kwargs):
if value is True:
AnswerFactory(
answer = AnswerFactory(
question=question,
with_multiple_choice=kwargs.get("with_multiple_choice"),
with_free_text=kwargs.get("with_free_text"),
)
question.save()
answer.save()


class ConsultationResponseFactory(factory.django.DjangoModelFactory):
Expand Down

0 comments on commit 24f165e

Please sign in to comment.