Home
last modified time | relevance | path

Searched refs:subscription (Results 1 – 9 of 9) sorted by relevance

/tools/test/connectivity/acts/framework/acts/event/
Devent_bus.py61 subscription = EventSubscription(event_type, func,
64 return self.register_subscription(subscription)
76 for subscription in subscriptions:
77 registration_ids.append(self.register_subscription(subscription))
81 def register_subscription(self, subscription): argument
91 if subscription.event_type in self._subscriptions.keys():
92 subscription_list = self._subscriptions[subscription.event_type]
93 subscription_list.append(subscription)
97 bisect.insort(subscription_list, subscription)
98 self._subscriptions[subscription.event_type] = subscription_list
[all …]
Dsubscription_bundle.py38 subscription = EventSubscription(event_type, func,
41 return self.add_subscription(subscription)
43 def add_subscription(self, subscription): argument
55 registration_id = event_bus.register_subscription(subscription)
57 self.subscriptions[subscription] = registration_id
58 return subscription
60 def remove_subscription(self, subscription): argument
66 if subscription not in self.subscriptions.keys():
70 event_bus.unregister(self.subscriptions[subscription])
71 del self.subscriptions[subscription]
[all …]
Dsubscription_handle.py31 def subscription(self): member in SubscriptionHandle
/tools/test/connectivity/acts/framework/tests/event/
Devent_bus_test.py48 subscription = args[0]
52 self.assertEqual(subscription._event_type, mock_event)
53 self.assertEqual(subscription._func, mock_func)
54 self.assertEqual(subscription.order, order)
78 subscription = EventSubscription(mock_type, lambda _: None)
80 reg_id = event_bus.register_subscription(subscription)
83 self.assertTrue(subscription in bus._subscriptions[mock_type])
115 for subscription in mock_subscriptions:
116 subscription.order = 0
122 for subscription in mock_subscriptions:
[all …]
Dsubscription_bundle_test.py44 subscription = package.add_subscription.call_args[0][0]
45 self.assertEqual(subscription._event_type, event)
46 self.assertEqual(subscription._func, func)
47 self.assertEqual(subscription._event_filter, event_filter)
48 self.assertEqual(subscription.order, order)
106 for subscription in mock_subscription_list:
107 package.subscriptions[subscription] = None
114 for subscription in mock_subscription_list:
115 self.assertTrue(subscription in args or id(subscription) in args)
123 for subscription in mock_subscription_list:
[all …]
Devent_subscription_test.py38 subscription = EventSubscription(expected_event_type, lambda _: None)
39 self.assertEqual(expected_event_type, subscription.event_type)
44 subscription = EventSubscription(Mock(), func,
47 subscription.deliver(Mock())
54 subscription = EventSubscription(Mock(), func,
57 subscription.deliver(Mock())
/tools/test/connectivity/acts/framework/tests/controllers/android_lib/
Dservices_test.py40 any(subscription._func == service._start for subscription in
43 any(subscription._func == service._stop for subscription in
78 any(subscription._func == service._start for subscription in
81 any(subscription._func == service._stop for subscription in
/tools/test/connectivity/acts/framework/acts/controllers/
Diperf_server.py573 _AndroidDeviceBridge.on_test_begin.subscription)
574 event_bus.register_subscription(_AndroidDeviceBridge.on_test_end.subscription)
/tools/test/connectivity/acts/framework/acts/libs/logging/
Dlog_stream.py101 event_bus.register_subscription(_update_handlers.subscription)