'Test that questions created via the API are auto-tagged.'

def test_auto_tagging(self):

    TagFactory(name='desktop')
    q = QuestionFactory()
    self.client.force_authenticate(user=q.creator)
    tags_eq(q, [])
    res = self.client.post(reverse('question-set-metadata', args=[q.id]), content_type='application/json', data=json.dumps({'name': 'product', 'value': 'desktop'}))
    eq_(res.status_code, 200)
    tags_eq(q, [])
    res = self.client.post(reverse('question-auto-tag', args=[q.id]), content_type='application/json')
    eq_(res.status_code, 204)
    tags_eq(q, ['desktop'])
