mirror of
https://github.com/kk7ds/chirp
synced 2026-08-13 17:51:36 -04:00
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.
14 lines
485 B
Python
14 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)
|