import factory
from django.contrib.auth.models import User
from django.utils.timezone import now

class UserFactory(factory.DjangoModelFactory):
    FACTORY_FOR = User

    first_name = 'DRF'
    last_name = 'Test'
    username = 'drftest'
    password = 'drftest'
    is_active = True
    is_superuser = False
    last_login = now()
    date_joined = now()

@@ -90,16 +90,88 @@
 ort now%0A
+from shop.models import (Product, Stamp, Order, OrderDetails, Voucher)%0A%0A
 %0Aclass U
@@ -415,16 +415,760 @@
 _joined = now()%0A
+%0A%0Aclass ProductFactory(factory.DjangoModelFactory):%0A    FACTORY_FOR = Product%0A%0A    name = %22Product 1%22%0A    collect_stamp = True%0A%0A%0Aclass StampFactory(factory.DjangoModelFactory):%0A    FACTORY_FOR = Stamp%0A%0A    user = factory.SubFactory(UserFactory)%0A    redeemed = False%0A%0A%0Aclass OrderFactory(factory.DjangoModelFactory):%0A    FACTORY_FOR = Order%0A%0A    user = factory.SubFactory(UserFactory)%0A    date = now()%0A%0A%0Aclass OrderDetailsFactory(factory.DjangoModelFactory):%0A    FACTORY_FOR = OrderDetails%0A%0A    order = factory.SubFactory(OrderFactory)%0A    product = factory.SubFactory(ProductFactory)%0A    quantity = 4%0A%0A%0Aclass VoucherFactory(factory.DjangoModelFactory):%0A    FACTORY_FOR = Voucher%0A%0A    user = factory.SubFactory(UserFactory)%0A    redeemed = False%0A

Add factories for unit testing