Пример #1
0
    def setUp(self):
        self.author1 = AuthorFactory.create()
        self.author2 = AuthorFactory.create()

        self.other_site = SiteFactory.create()
        self.other_feed = FeedFactory.create(site=self.other_site)
        self.other_posts = PostFactory.create_batch(size=4, feed=self.other_feed, authors=[self.author1])

        self.my_site = Site.objects.get(pk=1)
        self.my_feed = FeedFactory.create(site=self.my_site)
        self.site_posts = PostFactory.create_batch(size=5, feed=self.my_feed, authors=[self.author2])
Пример #2
0
    def setUp(self):
        self.author1 = AuthorFactory.create()
        self.author2 = AuthorFactory.create()

        self.other_site = SiteFactory.create()
        self.other_feed = FeedFactory.create(site=self.other_site)
        self.other_posts = PostFactory.create_batch(size=4,
                                                    feed=self.other_feed,
                                                    authors=[self.author1])

        self.my_site = Site.objects.get(pk=1)
        self.my_feed = FeedFactory.create(site=self.my_site)
        self.site_posts = PostFactory.create_batch(size=5,
                                                   feed=self.my_feed,
                                                   authors=[self.author2])
Пример #3
0
    def setUp(self):
        self.site = Site.objects.get_current()
        self.feed = FeedFactory.create(title="Feed-1", site=self.site)
        self.author = AuthorFactory.create(name="Author-1")
        self.post_list = PostFactory.create_batch(size=3, feed=self.feed, authors=[self.author])

        post = self.post_list[0]
        post.tags = "tag1, tag2"
Пример #4
0
    def setUp(self):
        self.site = Site.objects.get_current()
        self.feed = FeedFactory.create(title="Feed-1", site=self.site)
        self.author = AuthorFactory.create(name="Author-1")
        self.post_list = PostFactory.create_batch(size=3,
                                                  feed=self.feed,
                                                  authors=[self.author])

        post = self.post_list[0]
        post.tags = "tag1, tag2"