mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 02:27:21 +00:00
069d715fcc
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.
15 lines
485 B
Python
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)
|