chirp/tests/test_features.py
Dan Smith 069d715fcc Add a test for radio prompts
This just makes sure we can get prompts from radios that support them
and that they're strings.

This can be extended to make sure that all drivers expose prompts
that are marked for translation.
2023-03-10 15:48:15 -08:00

15 lines
485 B
Python

from unittest import mock
from tests import base
class TestCaseFeatures(base.DriverTest):
def test_prompts(self):
self.use_patch(mock.patch('builtins._', create=True,
side_effect=lambda s: s))
prompts = self.radio.get_prompts()
for p in ('info', 'experimental', 'pre_download', 'pre_upload'):
prompt = getattr(prompts, p)
if prompt is not None:
self.assertIsInstance(prompt, str)