mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests/dbusmock/polkitd: Do not look for mock object again
We already get it as the parameter of the load function, so no need to find it
This commit is contained in:
@ -20,7 +20,7 @@ __license__ = 'LGPL 3+'
|
|||||||
import dbus
|
import dbus
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from dbusmock import MOCK_IFACE, mockobject
|
from dbusmock import MOCK_IFACE
|
||||||
|
|
||||||
BUS_NAME = 'org.freedesktop.PolicyKit1'
|
BUS_NAME = 'org.freedesktop.PolicyKit1'
|
||||||
MAIN_OBJ = '/org/freedesktop/PolicyKit1/Authority'
|
MAIN_OBJ = '/org/freedesktop/PolicyKit1/Authority'
|
||||||
@ -29,14 +29,12 @@ SYSTEM_BUS = True
|
|||||||
IS_OBJECT_MANAGER = False
|
IS_OBJECT_MANAGER = False
|
||||||
|
|
||||||
def load(mock, parameters):
|
def load(mock, parameters):
|
||||||
polkitd = mockobject.objects[MAIN_OBJ]
|
mock.allow_unknown = False
|
||||||
# default state
|
mock.allowed = []
|
||||||
polkitd.allow_unknown = False
|
mock.delay = 0
|
||||||
polkitd.allowed = []
|
mock.simulate_hang = False
|
||||||
polkitd.delay = 0
|
mock.hanging_actions = []
|
||||||
polkitd.simulate_hang = False
|
mock.hanging_calls = []
|
||||||
polkitd.hanging_actions = []
|
|
||||||
polkitd.hanging_calls = []
|
|
||||||
|
|
||||||
mock.AddProperties(MAIN_IFACE,
|
mock.AddProperties(MAIN_IFACE,
|
||||||
dbus.Dictionary({
|
dbus.Dictionary({
|
||||||
|
|||||||
Reference in New Issue
Block a user