def PUT(self, name):
            """
            Create a new user with the specified id, or edit it if it already
            exists
            """
            if self.user:
                # Edit the current user
                self.user.name = name
                return 'PUT %d' % self.user.id
            else:
                # Make a new user with said attributes.
                return 'PUT %d' % make_user(name, self.id)

            Create a new user with the specified id, or edit it if it already
            exists
            
cherrypy/test/test_dynamicobjectmapping.py