# Path: lazysignup/models.py
# class LazyUser(models.Model):
#     user = models.OneToOneField(constants.LAZYSIGNUP_USER_MODEL, on_delete=models.CASCADE)
#     created = models.DateTimeField(default=now, db_index=True)
#     objects = LazyUserManager()
# 
#     @classmethod
#     def get_user_class(cls):
#         related_user_field = cls._meta.get_field('user')
#         # Django < 1.9 has rel.to
#         if hasattr(related_user_field, 'rel'):
#             rel_to = related_user_field.rel.to if related_user_field.rel else None
#         elif hasattr(related_user_field, 'remote_field'):
#             rel_to = related_user_field.remote_field.model if related_user_field.remote_field else None
#         return rel_to
# 
#     def __str__(self):
#         return '{0}:{1}'.format(self.user, self.created)


from django.test import TestCase
from lazysignup.models import LazyUser



class LazyUserModelTests(TestCase):
    """
    Tests for LazyUser Model
    """
    def setUp(self):
        super(LazyUserModelTests, self).setUp()

    def test_str(self):
        """
        Tests str method on LazyUser
        """

# Path: lazysignup/models.py
# class LazyUser(models.Model):
#     user = models.OneToOneField(constants.LAZYSIGNUP_USER_MODEL, on_delete=models.CASCADE)
#     created = models.DateTimeField(default=now, db_index=True)
#     objects = LazyUserManager()
# 
#     @classmethod
#     def get_user_class(cls):
#         related_user_field = cls._meta.get_field('user')
#         # Django < 1.9 has rel.to
#         if hasattr(related_user_field, 'rel'):
#             rel_to = related_user_field.rel.to if related_user_field.rel else None
#         elif hasattr(related_user_field, 'remote_field'):
#             rel_to = related_user_field.remote_field.model if related_user_field.remote_field else None
#         return rel_to
# 
#     def __str__(self):
#         return '{0}:{1}'.format(self.user, self.created)


# Path: lazysignup/tests/test_models.py
from django.test import TestCase
from lazysignup.models import LazyUser




class LazyUserModelTests(TestCase):
    """
    Tests for LazyUser Model
    """
    def setUp(self):
        super(LazyUserModelTests, self).setUp()

    def test_str(self):
        """
        Tests str method on LazyUser
        """

        user, username = LazyUser.objects.create_lazy_user()