def __init__(self, registry): Log("landmarks", "Landmarks::__init__()") self.landmark_handle = scriptext.load('Service.Landmarks', 'IDataSource') self.registry = registry self.registry.Signal({ "type": "db_connect", "id": "wpt", "signal": "wpt_add", "handler": self.OnWptAdd }) self.registry.Signal({ "type": "db_connect", "id": "wpt", "signal": "wpt_del", "handler": self.OnWptDel }) self.registry.Signal({ "type": "db_connect", "id": "wpt", "signal": "wpt_search", "handler": self.OnWptSearch }) self.registry.Signal({ "type": "db_connect", "id": "wpt", "signal": "wpt_monitor", "handler": self.OnWptMonitor })
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.sensor_handle = None try: self.sensor_handle = scriptext.load('Service.Sensor', 'ISensor') except Exception, err: self.fail(str(err))
def test_err_loadservice(self): """ Trying to load an unsupported Service""" try: self.contacts_handle = scriptext.load('Service.Unsupported', 'Interface') except Exception, err: self.failUnlessEqual("(-5, 'error attaching requested services')", str(err))
def __init__(self,registry): Log("landmarks","Landmarks::__init__()") self.landmark_handle = scriptext.load('Service.Landmarks', 'IDataSource') self.registry = registry self.registry.Signal( { "type":"db_connect", "id":"wpt", "signal":"wpt_add", "handler":self.OnWptAdd } ) self.registry.Signal( { "type":"db_connect", "id":"wpt", "signal":"wpt_del", "handler":self.OnWptDel } ) self.registry.Signal( { "type":"db_connect", "id":"wpt", "signal":"wpt_search", "handler":self.OnWptSearch } ) self.registry.Signal( { "type":"db_connect", "id":"wpt", "signal":"wpt_monitor","handler":self.OnWptMonitor } )
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.logging_handle = None self.logging_handle = scriptext.load('Service.Logging', 'IDataSource')
def do_load(self): service_handle = scriptext.load('Service.Logging', 'IDataSource') return service_handle
def do_load(self): service_handle = scriptext.load('Service.Calendar', 'IDataSource') return service_handle
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.contacts_handle = None self.calendar_handle = scriptext.load('Service.Calendar', 'IDataSource')
def __init__(self): import scriptext self.__messaging_handle = scriptext.load('Service.Messaging', 'iMessaging')
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.messaging_handle = None self.messaging_handle = scriptext.load('Service.Messaging', 'IMessaging')
import socket import btsocket import scriptext import time from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication import sys messaging_handle = scriptext.load("Service.Messaging", "IMessaging") class ImapConversation: def __init__(self, conn): self.__conn = conn self.__selectedFolder = None def handle(self): res = self.hHelo() try: while res: opId, op, args = self.readMsg() print opId, op, args if not hasattr(self, "h" + op[0] + op[1:].lower()): res = False else: res = getattr(self, "h" + op[0] + op[1:].lower())(opId, args) print "EXIT CONNECTION" self.__conn.close() except: print "Unexpected error:", sys.exc_info()
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.contacts_handle = None self.list_of_contactIDs = [] # Load the service self.contacts_handle = scriptext.load('Service.Contact', 'IDataSource')
def test_multi_loadservices(self): """Consecutive loading of the service""" self.contacts_handle = scriptext.load('Service.Contact', 'IDataSource') self.contacts_handle = scriptext.load('Service.Contact', 'IDataSource')
def do_load(self): service_handle = scriptext.load('Service.Sensor', 'ISensor') return service_handle
def do_load(self, generic_service_name): service_handle = scriptext.load(service_map[generic_service_name][0], service_map[generic_service_name][1]) return service_handle
def do_load(self): service_handle = scriptext.load('Service.MediaManagement', 'IDataSource') return service_handle
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.scriptexthandle = None # Load the service self.scriptexthandle = scriptext.load('Service.AppManager', 'IAppManager')
def __init__(self, methodName='runTest'): unittest.TestCase.__init__(self, methodName=methodName) self.sysinfo_handle = None self.sysinfo_handle = scriptext.load('Service.SysInfo', 'ISysInfo')
def do_load(self): service_handle = scriptext.load('Service.Messaging', 'IMessaging') return service_handle
def do_load(self): service_handle = scriptext.load('Service.SysInfo', 'ISysInfo') return service_handle