async def test_xctest_run_app(self) -> None: mock = AsyncMock() mock.return_value = [] with patch("idb.cli.commands.xctest_run.RunXcTestAppCommand.run", new=mock, create=True): test_bundle_id = "com.me.tests" app_under_test_id = "com.me.app" await cli_main(cmd_input=[ "xctest", "run", "app", test_bundle_id, app_under_test_id ]) namespace = self.xctest_run_namespace("app", test_bundle_id) namespace.app_bundle_id = app_under_test_id namespace.force = False namespace.timeout = XCTEST_TIMEOUT namespace.grpc = False mock.assert_called_once_with(namespace, Namespace())
async def test_xctest_run_app(self) -> None: mock = AsyncMock() mock.return_value = [] with patch("idb.cli.commands.xctest.XcestRunAppCommand.run", new=mock, create=True): test_bundle_id = "com.me.tests" app_under_test_id = "com.me.app" await cli_main(cmd_input=[ "xctest", "run", "app", test_bundle_id, app_under_test_id ]) namespace = self.xctest_run_namespace("app", test_bundle_id) # pyre-fixme[16]: `Namespace` has no attribute `app_bundle_id`. namespace.app_bundle_id = app_under_test_id # pyre-fixme[16]: `Namespace` has no attribute `force`. namespace.force = False # pyre-fixme[16]: `Namespace` has no attribute `timeout`. namespace.timeout = XCTEST_TIMEOUT mock.assert_called_once_with(namespace)
async def test_xctest_run_ui(self) -> None: mock = AsyncMock() mock.return_value = [] with patch("idb.cli.commands.xctest.XctestRunUICommand.run", new=mock, create=True): test_bundle_id = "com.me.tests" app_under_test_id = "com.me.app" test_host_app_bundle_id = "com.host.app" await cli_main(cmd_input=[ "xctest", "run", "ui", test_bundle_id, app_under_test_id, test_host_app_bundle_id, ]) namespace = self.xctest_run_namespace("ui", test_bundle_id) namespace.app_bundle_id = app_under_test_id namespace.test_host_app_bundle_id = test_host_app_bundle_id namespace.timeout = XCTEST_TIMEOUT mock.assert_called_once_with(namespace)