def setUp(self): try: options['connection_string'] = 'mobile.db' os.remove(options['connection_string']) except OSError as e: pass self.db = DBaseService(parent=None, options=options) yield self.db.schema() yield self.registerInstrument() self.row1 = { 'name': 'TESS-AH', 'seq': 1, 'freq': 1000.01, 'mag': 12.0, 'tamb': 0, 'tsky': -12, 'lat': 40.418561, 'long': -3.551502, 'height': 650.0, 'tstamp_src': 'Subscriber' } self.row2 = { 'name': 'TESS-OAM', 'seq': 1, 'freq': 1000.01, 'mag': 12.0, 'tamb': 0, 'tsky': -12, 'lat': 39.64269, 'long': 2.950533, 'height': 100.0, 'tstamp_src': 'Subscriber' }
def setUp(self): try: options['connection_string'] = 'fixed.db' os.remove(options['connection_string']) #os.remove('tess_location.json') #os.remove('locations.json') except OSError as e: pass with open('locations.json', 'w') as f: json.dump(TEST_LOCATIONS, f) with open('tess_location.json', 'w') as f: json.dump(self.TEST_DEPLOYMENTS1, f) self.db = DBaseService(parent=None, options=options) yield self.db.schema() yield self.registerInstrument() yield self.db.reloadService(options) self.row1 = { 'name': 'TESS-AH', 'seq': 1, 'freq': 1000.01, 'mag': 12.0, 'tamb': 0, 'tsky': -12, 'tstamp_src': 'Subscriber' } self.row2 = { 'name': 'TESS-OAM', 'seq': 1, 'freq': 1000.01, 'mag': 12.0, 'tamb': 0, 'tsky': -12, 'tstamp_src': 'Subscriber' }
def setUp(self): try: os.remove(options['connection_string']) except OSError as e: pass self.db = DBaseService(parent=None, options=options) yield self.db.schema() self.db.tess.resetCounters()
def setUp(self): try: os.remove(options['connection_string']) except OSError as e: pass with open('locations.json','w') as f: json.dump(TEST_LOCATIONS, f) with open('tess_location.json','w') as f: json.dump(self.TEST_DEPLOYMENTS1, f) self.db = DBaseService(parent=None, options=options) yield self.db.schema() yield self.registerInstrument() yield self.db.reloadService(options)
options = None # Start the logging subsystem startLogging(console=cmdline_opts.console, filepath=cmdline_opts.log_file) # ------------------------------------------------ # Assemble application from its service components # ------------------------------------------------ application = Application("TESSDB") tessdbService = TESSDBService(options['tessdb'], config_file) tessdbService.setName(TESSDBService.NAME) tessdbService.setServiceParent(application) dbaseService = DBaseService(options['dbase']) dbaseService.setName(DBaseService.NAME) dbaseService.setServiceParent(tessdbService) filterService = FilterService(options['filter']) filterService.setName(FilterService.NAME) filterService.setServiceParent(tessdbService) mqttService = MQTTService(options['mqtt']) mqttService.setName(MQTTService.NAME) mqttService.setServiceParent(tessdbService) # -------------------------------------------------------- # Store direct links to subservices in our manager service # --------------------------------------------------------