{"body":"    def test_password_change_with_pool(self):\n        old_password = self.user_sna['password']\n        self.cleanup_pools()\n\n        # authenticate so that connection is added to pool before password\n        # change\n        user_ref = self.identity_api.authenticate(\n            self.make_request(),\n            user_id=self.user_sna['id'],\n            password=self.user_sna['password'])\n\n        self.user_sna.pop('password')\n        self.user_sna['enabled'] = True\n        self.assertDictEqual(self.user_sna, user_ref)\n\n        new_password = 'new_password'\n        user_ref['password'] = new_password\n        self.identity_api.update_user(user_ref['id'], user_ref)\n\n        # now authenticate again to make sure new password works with\n        # connection pool\n        user_ref2 = self.identity_api.authenticate(\n            self.make_request(),\n            user_id=self.user_sna['id'],\n            password=new_password)\n\n        user_ref.pop('password')\n        self.assertDictEqual(user_ref, user_ref2)\n\n        # Authentication with old password would not work here as there\n        # is only one connection in pool which get bind again with updated\n        # password..so no old bind is maintained in this case.\n        self.assertRaises(AssertionError,\n                          self.identity_api.authenticate,\n                          self.make_request(),\n                          user_id=self.user_sna['id'],\n                          password=old_password)","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/MR6u9g0X","modified":1484958298,"id":"MR6u9g0X","size":1473,"lines":37,"own_paste":false,"theme":"","date":1484958298}