'Ensure archived articles show only when requested.'

def test_archived(self):

    doc = DocumentFactory(title=u'impalas', locale=u'en-US', is_archived=True)
    ApprovedRevisionFactory(document=doc, summary=u'impalas', is_approved=True)
    self.refresh()
    qs = {'q': 'impalas', 'a': 1, 'w': 1, 'format': 'json', 'include_archived': 'on'}
    response = self.client.get(reverse('search.advanced'), qs)
    results = json.loads(response.content)['results']
    eq_(1, len(results))
    qs = {'q': 'impalas', 'a': 0, 'w': 1, 'format': 'json'}
    response = self.client.get(reverse('search.advanced'), qs)
    results = json.loads(response.content)['results']
    eq_(0, len(results))
