debugd: Add tests for CupsTool operations.
Test CupsAddManuallyConfiguredPrinter and CupsAddAutoConfiguredPrinter
to verify that they return the correct error codes.
BUG=chromium:683241,chromium:683254
TEST=test_that ... e:platform_DebugDaemonCupsAdd.*
CQ-DEPEND=CL:452804
Change-Id: I3d9c45a7a599070a8d5c61a31f40d055e31720d1
Reviewed-on: https://chromium-review.googlesource.com/452546
Commit-Ready: Sean Kau <[email protected]>
Tested-by: Sean Kau <[email protected]>
Reviewed-by: Katherine Threlkeld <[email protected]>
Reviewed-by: Sean Kau <[email protected]>
diff --git a/client/cros/debugd_util.py b/client/cros/debugd_util.py
new file mode 100644
index 0000000..0b6c682
--- /dev/null
+++ b/client/cros/debugd_util.py
@@ -0,0 +1,12 @@
+# Copyright 2017 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import dbus
+
+
+def iface():
+ """Returns the interface object for debugd."""
+ bus = dbus.SystemBus()
+ proxy = bus.get_object('org.chromium.debugd', '/org/chromium/debugd')
+ return dbus.Interface(proxy, dbus_interface='org.chromium.debugd')