'Logout should work whether the user is logged in or not (#9978).'

def test_logout(self):

    self.client.logout()
    login = self.client.login(username=u'testclient', password=u'password')
    self.assertTrue(login, u'Could    not    log    in')
    self.client.logout()
    self.client.logout()
