def test_topic_publish(self):
        utils.login(self)
        category = utils.create_category()
        form_data = {'comment': 'foo', 'title': 'foobar', 'category': category.pk}
        response = self.client.post(reverse('spirit:topic:publish'),
                                    form_data)
        topic = Topic.objects.last()
        expected_url = topic.get_absolute_url()
        self.assertRedirects(response, expected_url, status_code=302)

        # Make sure it does not creates an empty poll
        self.assertRaises(ObjectDoesNotExist, lambda: topic.poll)

        # ratelimit
        response = self.client.post(reverse('spirit:topic:publish'),
                                    form_data)
        self.assertEqual(response.status_code, 200)

        # get
        response = self.client.get(reverse('spirit:topic:publish'))
        self.assertEqual(response.status_code, 200)
Testing /contacts/type/view/(?P<type_id>\d+)
dataset/ETHPy150Open nitely/Spirit/spirit/topic/tests.py/TopicViewTest.test_topic_publish--crossover with--dataset/ETHPy150Open treeio/treeio/treeio/identities/tests.py/IdentitiesViewsTest.test_contact_type_view_out