'Test ban button text for a non-banned user who has revisions not submitted as spam.'

def test_not_banned_user_no_revisions_ban_button(self):

    num_revisions = 3
    self.create_revisions(num=num_revisions, document=self.document, creator=self.testuser)
    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')
    ban_button = page.find('#ban-and-cleanup-form    button[type=submit]')
    ban_other_reasons = page.find('#ban-for-other-reasons')
    eq_(len(revisions_found), num_revisions)
    eq_(ban_button.text(), 'Ban    User    for    Spam    &    Submit    Spam')
    eq_(len(ban_other_reasons), 1)
