diff options
| author | Dave Hibberd <d@vehibberd.com> | 2023-10-16 21:37:27 +0100 |
|---|---|---|
| committer | Dave Hibberd <d@vehibberd.com> | 2023-10-16 21:37:27 +0100 |
| commit | 91dbf844ad923e3c4bca1252dd104d8fc8ce5475 (patch) | |
| tree | 93c4db659daf278db034b304e4cd910454504ec1 /tests/unit/test_bandplan.py | |
| parent | 6f19923a918f7fb63a444b0c99950fdbe9d2f74c (diff) | |
New upstream version 20231016upstream/20231016
Diffstat (limited to 'tests/unit/test_bandplan.py')
| -rw-r--r-- | tests/unit/test_bandplan.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/unit/test_bandplan.py b/tests/unit/test_bandplan.py new file mode 100644 index 0000000..c6fd920 --- /dev/null +++ b/tests/unit/test_bandplan.py @@ -0,0 +1,33 @@ +import unittest + +from chirp import bandplan + + +class FakeConfig: + def __init__(self, bandplan): + self.bandplan = bandplan + + def is_defined(self, opt, sec): + return True + + def get(self, opt, sec): + return None + + def get_bool(self, opt, sec): + return opt == self.bandplan + + +class BandPlanTest(unittest.TestCase): + def test_get_repeater_bands(self): + plans = bandplan.BandPlans(FakeConfig('north_america')) + expected = ['10 Meter Band', + '6 Meter Band', + '2 Meter Band', + '1.25 Meter Band', + '70 Centimeter Band', + '33 Centimeter Band', + '23 Centimeter Band', + '13 Centimeter Band'] + + self.assertEqual(expected, + [b.name for b in plans.get_repeater_bands()]) |
