diff --git a/code/tests/subcommands/test_add_device.py b/code/tests/subcommands/test_add_device.py index 1c82ec9..d2b4044 100644 --- a/code/tests/subcommands/test_add_device.py +++ b/code/tests/subcommands/test_add_device.py @@ -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