MAINT: Refactor, move factories into tests
This commit is contained in:
parent
31714215d0
commit
02a21306fe
16 changed files with 49 additions and 42 deletions
|
@ -1,6 +1,7 @@
|
|||
import factory
|
||||
|
||||
from .models import MeasurementUnit, MeasurementType, Material, Color, Container
|
||||
from ..models import (MeasurementUnit, MeasurementType, Material, Color,
|
||||
Container)
|
||||
|
||||
|
||||
class MeasurementUnitFactory(factory.DjangoModelFactory):
|
|
@ -1,9 +1,10 @@
|
|||
from django.test import TestCase
|
||||
from django.db import IntegrityError, transaction
|
||||
|
||||
from ..models import MeasurementUnit, MeasurementType, Material, Color, Container
|
||||
from ..factories import MeasurementUnitFactory, MeasurementTypeFactory, \
|
||||
MaterialFactory, ColorFactory, ContainerFactory
|
||||
from ..models import (MeasurementUnit, MeasurementType, Material, Color,
|
||||
Container)
|
||||
from .factories import (MeasurementUnitFactory, MeasurementTypeFactory,
|
||||
MaterialFactory, ColorFactory, ContainerFactory)
|
||||
|
||||
|
||||
class MeasurementUnitTestCase(TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue