# Path: test_project/test_accounts/models.py
# class Profile(models.Model):
#     user = models.OneToOneField(User)
# 
#     short_info = models.TextField(blank=True)


from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.utils import override_settings
from test_project.test_accounts.models import Profile



@override_settings(USERPROFILES_USE_PROFILE=True, AUTH_PROFILE_MODULE='test_accounts.Profile')
class ViewTests(TestCase):
    def setUp(self):
        self.data = {
            'username': 'newuser',
            'email': 'newuser@example.com',
            'new_email': 'anotheremail@example.com',
            'password': 'newuserpass',
            'first_name': 'John',
            'last_name': 'Doe',
            'short_info': 'Short Info Test!'
        }
        self.user = User.objects.create_user(self.data['username'], self.data['email'],
            self.data['password'])

# Path: test_project/test_accounts/models.py
# class Profile(models.Model):
#     user = models.OneToOneField(User)
# 
#     short_info = models.TextField(blank=True)


# Path: userprofiles/contrib/profiles/tests/test_views.py
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.utils import override_settings
from test_project.test_accounts.models import Profile




@override_settings(USERPROFILES_USE_PROFILE=True, AUTH_PROFILE_MODULE='test_accounts.Profile')
class ViewTests(TestCase):
    def setUp(self):
        self.data = {
            'username': 'newuser',
            'email': 'newuser@example.com',
            'new_email': 'anotheremail@example.com',
            'password': 'newuserpass',
            'first_name': 'John',
            'last_name': 'Doe',
            'short_info': 'Short Info Test!'
        }
        self.user = User.objects.create_user(self.data['username'], self.data['email'],
            self.data['password'])

        Profile(user=self.user).save()