'The login buttons should not display on the 404 page when the
user is logged in'

def test_404_already_logged_in(self):

    self.client.login(username='testuser', password='testpass')
    response = self.client.get('/something-doesnt-exist', follow=True)
    doc = pq(response.content)
    login_block = doc.find('.socialaccount-providers')
    eq_(len(login_block), 0)
    eq_(404, response.status_code)
    self.client.logout()
