def test_it_recognises_an_rds_cc_ecc(self): service = FMBearer('ce1', 'c0c0', 107) self.assertEqual('ce1', service.country)
def lookup_fm(self, country=None, pi=None, frequency=None): service = FMBearer(country, pi, frequency) return self.__lookup(service)
def test_it_constructs_an_fqdn(self): service = FMBearer('ce1', 'c0c0', 107) self.assertEqual('10700.c0c0.ce1.fm.radiodns.org', service.fqdn())
def test_it_rejects_non_numerical_frequencies(self): with self.assertRaises(ValueError): FMBearer('ce1', 'c0c0', 'foo')
def test_it_rejects_low_frequencies(self): with self.assertRaises(ValueError): FMBearer('ce1', 'c0c0', 60)
def test_it_stores_a_valid_frequency(self): service = FMBearer('ce1', 'c0c0', 104.9) self.assertEqual(104.9, service.frequency)
def test_it_accepts_frequency_as_integer(self): service = FMBearer('ce1', 'c0c0', 107) self.assertEqual(107.0, service.frequency)