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