-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Jer-Sch
committed
Sep 8, 2021
1 parent
1bd981f
commit e746f4e
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
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,9 +1,13 @@ | ||
import factory | ||
from grants.models.grant_api_key import GrantAPIKey | ||
|
||
from .profile_factory import ProfileFactory | ||
|
||
|
||
class GrantAPIKeyFactory(factory.django.DjangoModelFactory): | ||
"""Create mock GrantAPIKey for testing.""" | ||
|
||
class Meta: | ||
model = GrantAPIKey | ||
model = GrantAPIKey | ||
|
||
profile = factory.SubFactory(ProfileFactory) |
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,12 @@ | ||
import factory | ||
from dashboard.models import Profile | ||
|
||
|
||
class ProfileFactory(factory.django.DjangoModelFactory): | ||
"""Create mock Profile for testing.""" | ||
|
||
class Meta: | ||
model = Profile | ||
|
||
handle = factory.Sequence(lambda n: "Contributor_%03d" % n) | ||
data = {} |
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