# Path: account/factories.py
# class AccountFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Account
# 
#     user = factory.SubFactory(UserFactory)
# 
# class RelationshipFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Relationship
# 
#     owner = factory.SubFactory(AccountFactory)
#     follow = factory.SubFactory(AccountFactory)
# 
# DEFAULT_PASSWORD = 'abc@123'


from unittest.mock import patch, MagicMock
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.core.files.uploadedfile import SimpleUploadedFile
from account.factories import AccountFactory, RelationshipFactory, DEFAULT_PASSWORD





class TestAccount(TestCase):
    def setUp(self):
        new_user = AccountFactory.build().user
        self.account = AccountFactory.create()
        self.user = self.account.user
        self.form_login = {
            'identity': self.user.username,

# Path: account/factories.py
# class AccountFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Account
# 
#     user = factory.SubFactory(UserFactory)
# 
# class RelationshipFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Relationship
# 
#     owner = factory.SubFactory(AccountFactory)
#     follow = factory.SubFactory(AccountFactory)
# 
# DEFAULT_PASSWORD = 'abc@123'


# Path: account/tests.py
from unittest.mock import patch, MagicMock
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.core.files.uploadedfile import SimpleUploadedFile
from account.factories import AccountFactory, RelationshipFactory, DEFAULT_PASSWORD






class TestAccount(TestCase):
    def setUp(self):
        new_user = AccountFactory.build().user
        self.account = AccountFactory.create()
        self.user = self.account.user
        self.form_login = {
            'identity': self.user.username,

            'password': DEFAULT_PASSWORD,