def test_preview(self):
        f = ForumFactory()
        u = UserFactory()

        self.client.login(username=u.username, password='testpass')
        content = 'Full of awesome.'
        response = post(self.client, 'forums.new_thread',
                        {'title': 'Topic', 'content': content,
                         'preview': 'any string'}, args=[f.slug])
        eq_(200, response.status_code)
        doc = pq(response.content)
        eq_(content, doc('#post-preview div.content').text())
        eq_(0, f.thread_set.count())  # No thread was created.
Initialize the device.
dataset/ETHPy150Open mozilla/kitsune/kitsune/forums/tests/test_templates.py/NewThreadTemplateTests.test_preview--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/isy994.py/ISYDeviceABC.__init__