-
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
9 changed files
with
64 additions
and
63 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from factory.django import DjangoModelFactory | ||
import factory | ||
from faker import Faker | ||
|
||
from core.models import FinancialYear | ||
|
@@ -15,7 +15,7 @@ | |
fake = Faker() | ||
|
||
|
||
class DepartmentalGroupFactory(DjangoModelFactory): | ||
class DepartmentalGroupFactory(factory.django.DjangoModelFactory): | ||
""" | ||
Define DepartmentalGroup Factory | ||
""" | ||
|
@@ -30,7 +30,7 @@ class Meta: | |
active = True | ||
|
||
|
||
class DirectorateFactory(DjangoModelFactory): | ||
class DirectorateFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = Directorate | ||
django_get_or_create = ("directorate_code",) | ||
|
@@ -41,15 +41,15 @@ class Meta: | |
active = True | ||
|
||
|
||
class FinancialYearFactory(DjangoModelFactory): | ||
class FinancialYearFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = FinancialYear | ||
django_get_or_create = ("financial_year",) | ||
|
||
financial_year = 2019 | ||
|
||
|
||
class FinanceBusinessPartnerFactory(DjangoModelFactory): | ||
class FinanceBusinessPartnerFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = BusinessPartner | ||
django_get_or_create = ("name", "surname") | ||
|
@@ -58,15 +58,15 @@ class Meta: | |
surname = "FBP" | ||
|
||
|
||
class BSCEFactory(DjangoModelFactory): | ||
class BSCEFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = BSCEEmail | ||
django_get_or_create = ("bsce_email",) | ||
|
||
bsce_email = "[email protected]" # /PS-IGNORE | ||
|
||
|
||
class CostCentreFactory(DjangoModelFactory): | ||
class CostCentreFactory(factory.django.DjangoModelFactory): | ||
""" | ||
Define CostCentre Factory | ||
""" | ||
|
@@ -83,7 +83,7 @@ class Meta: | |
bsce_email = factory.SubFactory(BSCEFactory) | ||
|
||
|
||
class ArchivedCostCentreFactory(DjangoModelFactory): | ||
class ArchivedCostCentreFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = ArchivedCostCentre | ||
|
||
|
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,8 +1,8 @@ | ||
from factory.django import DjangoModelFactory | ||
import factory | ||
|
||
from upload_file.models import FileUpload | ||
|
||
|
||
class FileUploadFactory(DjangoModelFactory): | ||
class FileUploadFactory(factory.django.DjangoModelFactory): | ||
class Meta: | ||
model = FileUpload |
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
Oops, something went wrong.