def test_tag_filtering()

in pulseapi/tags/tests.py [0:0]


    def test_tag_filtering(self):
        """Filter tags by first letters"""
        payload = self.generatePostPayload(data={
            'title': 'title test_tag_filtering',
            'description': 'description test_tag_filtering',
            'tags': ['test tag'],
            'interest': 'interest field',
            'get_involved': 'get involved text field',
            'get_involved_url': 'http://example.com/getinvolved',
            'thumbnail_url': 'http://example.com/',
            'content_url': 'http://example.com/',
            'internal_notes': 'Some internal notes'
        })

        self.client.post('/api/pulse/entries/', data=payload)
        tagList = self.client.get('/api/pulse/tags/?search=te')
        tagsJson = json.loads(str(tagList.content, 'utf-8'))
        self.assertEqual(len(tagsJson), 1)