-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
34 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from pytest_factoryboy import register | ||
|
||
from .factories import AiReportFactory | ||
|
||
register(AiReportFactory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import random | ||
|
||
import factory | ||
|
||
from apps.ai_reports.models import AiReport | ||
from tests.factories import CommentFactory | ||
|
||
|
||
class AiReportFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = AiReport | ||
|
||
category = factory.Faker("word") | ||
explanation = factory.Faker("sentence", nb_words=6) | ||
confidence = random.random() | ||
comment = factory.SubFactory(CommentFactory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from pytest_factoryboy import register | ||
|
||
from tests.ai_reports.factories import AiReportFactory | ||
from tests.ideas.factories import IdeaFactory | ||
from tests.moderatorfeedback.factories import ModeratorCommentFeedbackFactory | ||
|
||
register(IdeaFactory) | ||
register(ModeratorCommentFeedbackFactory) | ||
register(AiReportFactory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters