# Path: account/factories.py
# class AccountFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Account
# 
#     user = factory.SubFactory(UserFactory)
# 
# DEFAULT_PASSWORD = 'abc@123'
# 
# Path: link/factories.py
# class PostFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Post
# 
#     owner = factory.SubFactory(AccountFactory)
#     publisher = factory.SubFactory(AccountFactory)
#     url = 'http://test.tst'
#     type = 'html'
#     title = factory.sequence(lambda n: 'Title Link Test {}'.format(n))
#     summary = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
#     text = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
#     image_url = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
# 
# class ReactionFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Reaction
# 
#     owner = factory.SubFactory(AccountFactory)
#     post = factory.SubFactory(PostFactory)


import requests
from unittest.mock import patch
from django.test import TestCase
from django.core.urlresolvers import reverse
from account.factories import AccountFactory, DEFAULT_PASSWORD
from link.factories import PostFactory, ReactionFactory





class TestLink(TestCase):
    def setUp(self):
        self.other_user = AccountFactory.create()

# Path: account/factories.py
# class AccountFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Account
# 
#     user = factory.SubFactory(UserFactory)
# 
# DEFAULT_PASSWORD = 'abc@123'
# 
# Path: link/factories.py
# class PostFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Post
# 
#     owner = factory.SubFactory(AccountFactory)
#     publisher = factory.SubFactory(AccountFactory)
#     url = 'http://test.tst'
#     type = 'html'
#     title = factory.sequence(lambda n: 'Title Link Test {}'.format(n))
#     summary = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
#     text = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
#     image_url = factory.sequence(lambda n: 'Summary Link Test {}'.format(n))
# 
# class ReactionFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = Reaction
# 
#     owner = factory.SubFactory(AccountFactory)
#     post = factory.SubFactory(PostFactory)


# Path: link/tests.py
import requests
from unittest.mock import patch
from django.test import TestCase
from django.core.urlresolvers import reverse
from account.factories import AccountFactory, DEFAULT_PASSWORD
from link.factories import PostFactory, ReactionFactory






class TestLink(TestCase):
    def setUp(self):
        self.other_user = AccountFactory.create()

        self.other_user_post = PostFactory.create(owner=self.other_user, publisher=self.other_user)