def METHOD_NAME(self):
    import Glacier2
    def testLogin(username, password):
        import os
        c = omero.client(
            pmap=['--Ice.Config=' + (os.environ.get("ICE_CONFIG"))])
        host = c.ic.getProperties().getProperty('omero.host')
        port = int(c.ic.getProperties().getProperty('omero.port'))
        omero.client(host=host, port=port)
        sf = c.createSession(username, password)
        sf.getAdminService().getEventContext()
        c.closeSession()
    admin_root = self.root.sf.getAdminService()
    client = self.new_client()
    admin = client.sf.getAdminService()
    omeName = admin.getEventContext().userName
    # change password as user
    admin.changePassword(rstring("aaa"))
    testLogin(omeName, "aaa")
    # change password as root
    admin_root.changeUserPassword(omeName, rstring("ome"))
    with pytest.raises(Glacier2.PermissionDeniedException):
        testLogin(omeName, "aaa")
    testLogin(omeName, "ome")
    admin.changePasswordWithOldPassword(rstring("ome"), rstring("ccc"))
    testLogin(omeName, "ccc")