# Path: incuna_test_utils/factories/user.py
# class BaseAdminUserFactory(BaseUserFactory):
#     is_active = True
#     is_staff = True
#     is_superuser = True
# 
#     @factory.post_generation
#     def password(self, create, extracted, **kwargs):
#         # By using this method password can never be set to `None`!
#         self.raw_password = 'default_password' if extracted is None else extracted
#         self.set_password(self.raw_password)
#         if create:
#             self.save()
# 
# class BaseUserFactory(factory.DjangoModelFactory):
#     email = factory.Sequence('email{}@example.com'.format)


import factory
from django.contrib.auth.models import User
from incuna_test_utils.factories.user import BaseAdminUserFactory, BaseUserFactory



class UserFactory(BaseUserFactory):
    username = factory.Sequence('User {}'.format)

    class Meta:
        model = User


class AdminFactory(BaseAdminUserFactory):

# Path: incuna_test_utils/factories/user.py
# class BaseAdminUserFactory(BaseUserFactory):
#     is_active = True
#     is_staff = True
#     is_superuser = True
# 
#     @factory.post_generation
#     def password(self, create, extracted, **kwargs):
#         # By using this method password can never be set to `None`!
#         self.raw_password = 'default_password' if extracted is None else extracted
#         self.set_password(self.raw_password)
#         if create:
#             self.save()
# 
# class BaseUserFactory(factory.DjangoModelFactory):
#     email = factory.Sequence('email{}@example.com'.format)


# Path: tests/factories.py
import factory
from django.contrib.auth.models import User
from incuna_test_utils.factories.user import BaseAdminUserFactory, BaseUserFactory




class UserFactory(BaseUserFactory):
    username = factory.Sequence('User {}'.format)

    class Meta:
        model = User


class AdminFactory(BaseAdminUserFactory):

    username = factory.Sequence('User {}'.format)