def testCreate(self): conf = config.GetDefaultConfig() section = fcd_receiver.FCDReceiver.__name__ conf.add_section(section) conf.set(section, 'recording_dir', tempfile.mkdtemp()) conf.set(section, 'alsa_device', 'hw:1') conf.set(section, 'frequency_correction', '-12') return fcd_receiver.FCDReceiver(conf)
def Create(self): conf = config.GetDefaultConfig() section = usrp_receiver.USRPReceiver.__name__ conf.add_section(section) conf.set(section, 'recording_dir', tempfile.mkdtemp()) conf.set(section, 'device_address', 'test') conf.set(section, 'sample_rate_hz', '32000') return usrp_receiver.USRPReceiver(conf)
def Create(self): conf = config.GetDefaultConfig() section = rtlsdr_receiver.RTLSDRReceiver.__name__ conf.add_section(section) conf.set(section, 'recording_dir', tempfile.mkdtemp()) conf.set(section, 'device_index', '0') conf.set(section, 'tuner_gain_db', '0.1') conf.set(section, 'sample_rate_hz', '96000') return rtlsdr_receiver.RTLSDRReceiver(conf)
def GetConfigForTesting(): conf = config.GetDefaultConfig() section = client.Client.__name__ conf.add_section(section) conf.set(section, 'id', 'test_station_id') conf.set(section, 'secret', 'test_station_secret') conf.set(section, 'ca_certificate', '../etc/ca_cert.pem') return conf
def testCreate(self): conf = config.GetDefaultConfig() section = fcd_receiver.FCDReceiver.__name__ conf.add_section(section) conf.set(section, 'recording_dir', tempfile.mkdtemp()) conf.set(section, 'alsa_device', 'hw:1') r = TestFCDReceiver(conf) self.assertEquals(r._sample_rate, 192000) self.assertEquals(r.GetHardwareTunerHz(), 144000000)
def create(self): conf = config.GetDefaultConfig() section = diseqc_motor.DiSEqCMotor.__name__ conf.add_section(section) conf.set(section, 'serial_device', '/dev/null') conf.set(section, 'calibrated_rate', '10.0') conf.set(section, 'reference_zero', '0.0') conf.set(section, 'min_limit', '-45.0') conf.set(section, 'max_limit', '45.0') c = DummyDiSEqCController() m = diseqc_motor.DiSEqCMotor(conf, controller=c) m._internal_motor.reset_time = 0.1 return m, c
def create(self): conf = config.GetDefaultConfig() section = hamlib_motor.HamlibMotor.__name__ conf.add_section(section) conf.set(section, 'model', '1') conf.set(section, 'device', '/dev/null') conf.set(section, 'hamlib_param_min_az', '10.0') conf.set(section, 'hamlib_param_max_az', '80.0') commands = [] def check_output(args): commands.append(args) return '124.0\n64.0\n' m = hamlib_motor.HamlibMotor(conf) m.rotator._check_output = check_output return m, commands
def Create(self): conf = config.GetDefaultConfig() return dummy_receiver.DummyReceiver(conf)
def testGetStateDict(self): m = dummy_motor.DummyMotor(config.GetDefaultConfig()) self.assertTrue(isinstance(m.GetStateDict(), dict))
def testStop(self): m = dummy_motor.DummyMotor(config.GetDefaultConfig()) self.assertEquals(True, m.Stop())
def testStart(self): m = dummy_motor.DummyMotor(config.GetDefaultConfig()) program = [[0.0, 10.0, 20.0], [1.0, 20.0, 30.0]] self.assertEquals(True, m.Start(program))