def test_topic_publish_in_subcategory(self):
        utils.login(self)
        category = utils.create_category()
        subcategory = utils.create_subcategory(category)
        form_data = {'comment': 'foo', 'title': 'foobar', 'category': subcategory.pk}
        response = self.client.post(reverse('spirit:topic:publish', kwargs={'category_id': subcategory.pk, }),
                                    form_data)
        topic = Topic.objects.last()
        expected_url = topic.get_absolute_url()
        self.assertRedirects(response, expected_url, status_code=302)
POST, create topic in subcategory
dataset/ETHPy150Open nitely/Spirit/spirit/topic/tests.py/TopicViewTest.test_topic_publish_in_subcategory