Add test case to add-device subcommand
This commit is contained in:
parent
2e95bd2fd2
commit
7ffbdda7ea
@ -32,7 +32,8 @@ class TestDeviceSetup(unittest.TestCase):
|
||||
expected_file = self.test_dir / DEVICE_METADATA_FILE
|
||||
self.assertTrue(expected_file.exists()), f'Expected file not created: {expected_file}'
|
||||
|
||||
def test_device_setup(self):
|
||||
@patch('builtins.input', side_effect=['y']) # need mock_input else wont work
|
||||
def test_device_setup(self, mock_input):
|
||||
sys.argv = ['__main__.py', 'add', '--root_dir', str(self.test_dir), '--name', 'iPhone 14']
|
||||
main()
|
||||
expected_file = self.test_dir / DEVICE_METADATA_FILE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user