'The user\'s revisions show up in the ban and cleanup template.'

def test_user_revisions_in_one_click_page_template(self):

    revisions_expected = self.create_revisions(num=3, creator=self.testuser, document=self.document)
    self.client.login(username='admin', password='testpass')
    ban_url = reverse('users.ban_user_and_cleanup', kwargs={'username': self.testuser.username})
    resp = self.client.get(ban_url, follow=True)
    eq_(200, resp.status_code)
    page = pq(resp.content)
    revisions_found = page.find('.dashboard-row')
    revisions_found_text = ''
    for rev in revisions_found:
        revisions_found_text += rev.text_content()
    eq_(len(revisions_found), len(revisions_expected))
    for revision in revisions_expected:
        ok_((revision.title in revisions_found_text))
    ok_((self.original_revision.title not in revisions_found_text))
