def install(): reset() restagent.Rest = MockRest Services.heartbeat_listener = HeartbeatListener(None) mock.install() mock.reset() mock.register(Admin=Admin, Consumer=Consumer, Content=Content, Profile=Profile)
def install(): reset() mock.install() mock.reset() mock.register(Admin=Admin, Consumer=Consumer, Content=Content, Profile=Profile)
# License as published by the Free Software Foundation; either version # 2 of the License (LGPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the implied warranties of MERCHANTABILITY, # NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should # have received a copy of LGPLv2 along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt. # # Jeff Ortel <*****@*****.**> # from time import sleep from gofer.rmi import mock from gofer.rmi.dispatcher import NotPermitted mock.install() from server import main from gofer import proxy class MyError(Exception): def __init__(self, a, b): Exception.__init__(self, a) self.b = b class Admin: def hello(self): s = [] s.append('[mock]: Hello, I am gofer agent.')