def test_extract_loc(self): e = Entry(exchange='W2PE KC2ZUF FN03') self.assertEquals('KC2ZUF',e.extract_callsign())
def test_extract_callsign_rrr(self): e = Entry(exchange='W2PE KC2ZUF RRR') self.assertEquals('KC2ZUF',e.extract_callsign())
def test_extract_callsign_invalid(self): e = Entry(exchange='73 DIPOLE 10m') self.assertFalse(e.extract_callsign())
def test_extract_callsign_exchange(self): e = Entry(exchange='KC2ZUF W2PE R-14') self.assertEquals('W2PE', e.extract_callsign()) e = Entry(exchange='KC2ZUF W2PE -04') self.assertEquals('W2PE', e.extract_callsign())
def test_extract_callsign_none(self): e = Entry(exchange=None) self.assertFalse(e.extract_callsign()) e.exchange = '' self.assertFalse(e.extract_callsign())