'Canned response documents should have a noindex meta tag.'

def test_canned_responses_noindex(self):

    r = ApprovedRevisionFactory(content='Some    text.')
    response = self.client.get(r.document.get_absolute_url())
    eq_(200, response.status_code)
    doc = pq(response.content)
    eq_(0, len(doc('meta[name=robots]')))
    d = r.document
    d.category = CANNED_RESPONSES_CATEGORY
    d.save()
    cache.clear()
    response = self.client.get(r.document.get_absolute_url())
    eq_(200, response.status_code)
    doc = pq(response.content)
    eq_('noindex', doc('meta[name=robots]')[0].attrib['content'])
