# Path: user_management/models/tests/utils.py
# class APIRequestTestCase(Python2AssertMixin, BaseAPIRequestTestCase):
# class RequestTestCase(Python2AssertMixin, BaseRequestTestCase):
# 
# Path: user_management/utils/notifications.py
# def validation_email_context(notification):
#     """Email context to verify a user email."""
#     return {
#         'protocol': 'https',
#         'token': notification.user.generate_validation_token(),
#         'site': notification.site,
#     }
# 
# Path: user_management/models/tests/factories.py
# class UserFactory(factory.DjangoModelFactory):
#     name = factory.Sequence('Test User {}'.format)
#     email = factory.Sequence('email{}@example.com'.format)
#     is_active = True
# 
#     class Meta:
#         model = get_user_model()
# 
#     @factory.post_generation
#     def password(self, create, extracted='default password', **kwargs):
#         self.raw_password = extracted
#         self.set_password(self.raw_password)
#         if create:
#             self.save()


from django.contrib.sites.models import Site
from django.core import checks
from django.db.models import TextField
from django.db.utils import IntegrityError
from django.test import TestCase
from django.utils import timezone
from mock import Mock, patch
from user_management.models.tests import utils
from user_management.utils.notifications import validation_email_context
from . import models
from .factories import UserFactory
from .. import mixins
# -*- coding: utf-8 -*-





PASSWORD_CONTEXT = 'user_management.utils.notifications.password_reset_email_context'
VALIDATION_CONTEXT = 'user_management.utils.notifications.validation_email_context'
SEND_METHOD = 'user_management.utils.notifications.incuna_mail.send'



# Path: user_management/models/tests/utils.py
# class APIRequestTestCase(Python2AssertMixin, BaseAPIRequestTestCase):
# class RequestTestCase(Python2AssertMixin, BaseRequestTestCase):
# 
# Path: user_management/utils/notifications.py
# def validation_email_context(notification):
#     """Email context to verify a user email."""
#     return {
#         'protocol': 'https',
#         'token': notification.user.generate_validation_token(),
#         'site': notification.site,
#     }
# 
# Path: user_management/models/tests/factories.py
# class UserFactory(factory.DjangoModelFactory):
#     name = factory.Sequence('Test User {}'.format)
#     email = factory.Sequence('email{}@example.com'.format)
#     is_active = True
# 
#     class Meta:
#         model = get_user_model()
# 
#     @factory.post_generation
#     def password(self, create, extracted='default password', **kwargs):
#         self.raw_password = extracted
#         self.set_password(self.raw_password)
#         if create:
#             self.save()


# Path: user_management/models/tests/test_models.py
from django.contrib.sites.models import Site
from django.core import checks
from django.db.models import TextField
from django.db.utils import IntegrityError
from django.test import TestCase
from django.utils import timezone
from mock import Mock, patch
from user_management.models.tests import utils
from user_management.utils.notifications import validation_email_context
from . import models
from .factories import UserFactory
from .. import mixins

# -*- coding: utf-8 -*-





PASSWORD_CONTEXT = 'user_management.utils.notifications.password_reset_email_context'
VALIDATION_CONTEXT = 'user_management.utils.notifications.validation_email_context'
SEND_METHOD = 'user_management.utils.notifications.incuna_mail.send'



class TestUser(utils.APIRequestTestCase):