Call all the methods that do not depend on open()
(self, model)
| 15 | """Container class for tests""" |
| 16 | |
| 17 | def test_without_open(self, model): |
| 18 | """Call all the methods that do not depend on open()""" |
| 19 | rig = Hamlib.Rig(model) |
| 20 | assert rig is not None |
| 21 | assert rig.do_exception == 0 |
| 22 | assert rig.error_status == Hamlib.RIG_OK |
| 23 | |
| 24 | assert isinstance(rig.caps.model_name, str) |
| 25 | assert isinstance(rig.caps.mfg_name, str) |
| 26 | assert isinstance(rig.caps.version, str) |
| 27 | assert isinstance(rig.caps.copyright, str) |
| 28 | |
| 29 | assert rig.set_conf("", "") is None |
| 30 | assert rig.get_conf("") == "" |
| 31 | assert rig.get_conf(0) == "" |
| 32 | if model == Hamlib.RIG_MODEL_DUMMY: |
| 33 | conf = rig.get_conf("mcfg") |
| 34 | assert conf == "DX" |
| 35 | assert rig.set_conf("mcfg", "foobar") is None |
| 36 | conf = rig.get_conf("mcfg") |
| 37 | assert conf == "foobar" |
| 38 | else: |
| 39 | conf = rig.get_conf("mcfg") |
| 40 | assert conf == "" |
| 41 | |
| 42 | assert rig.token_lookup("") is None |
| 43 | |
| 44 | |
| 45 | def do_test_frequency(self, rig): |