Use callsign prefixes specified in Recommendation T/R 61-01.

pull/61/head
Christian T. Jacobs 2017-07-06 22:15:13 +01:00
rodzic 7835dc1ff6
commit 59fad31959
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -53,7 +53,7 @@
- Button to add the current date and time.
- Option to specify default values for the power and mode fields.
- Allow UTC time to be used when creating records.
- Allow prefixes/suffixes to be removed when looking up a callsign (e.g. "MYCALL" would be extracted from "EA3/MYCALL/M").
- Allow prefixes/suffixes to be removed when looking up a callsign (e.g. "MYCALL" would be extracted from "F/MYCALL/QRP").
### Changed
- Migrated the documentation to a Sphinx-based setup.

Wyświetl plik

@ -36,12 +36,17 @@ class TestCallsignLookup(unittest.TestCase):
def test_strip(self):
""" Check that a callsign with a prefix and a suffix is stripped correctly. """
callsign = "EA3/MYCALL/MM"
assert strip(callsign) == "MYCALL"
assert strip("F/MYCALL/MM") == "MYCALL"
assert strip("F/MYCALL/M") == "MYCALL"
assert strip("HB9/MYCALL/P") == "MYCALL"
assert strip("HB9/MYCALL/QRP") == "MYCALL"
assert strip("HB9/MYCALL/A") == "MYCALL"
assert strip("HB9/MYCALL/AM") == "MYCALL"
assert strip("HB9/MYCALL/PM") == "MYCALL"
def test_strip_prefix_only(self):
""" Check that a callsign with only a prefix is stripped correctly. """
callsign = "EA3/MYCALL"
callsign = "F/MYCALL"
assert strip(callsign) == "MYCALL"
def test_strip_suffix_only(self):