def test_validate_received_token(self):
     client = self.get_client()
     subject = "Joe USER"
     headers = {
         HTTP_HEADER_USER_INFO: subject,
         HTTP_HEADER_SIGNATURE: ""
     }
     token = client.fetch_user_token(headers, "SecurityClientTest")
     nt.assert_true(client.validate_received_token(token))
     b = TSer.serialize(token)
     token = EzSecurityToken()
     TSer.deserialize(token, b)
     nt.assert_true(client.validate_received_token(token))
 def test_mock_mode_validate_received(self):
     client = self.get_client()
     nt.assert_true(client.validate_received_token(EzSecurityToken()))