Exemplo n.º 1
0
 def create_dummy_type_of_device(self):
     # todo this method will fail if TestResource is not the **first** test executed
     Resource.create(self.dummy_device_name, Device,
                     self.dummy_device_class, DeviceSubSettings,
                     self.dummy_device_settings)
Exemplo n.º 2
0
from ereuse_devicehub.resources.event.device.domain import DeviceEventDomain
from ereuse_devicehub.resources.event.device.settings import EventWithDevices, EventSubSettingsMultipleDevices
from ereuse_devicehub.resources.resource import Resource

"""
    Registers the generic types for the events.

    This module creates as many Schema (extending from EventWithDevices) and Settings (extending from
    EventSubSettingsMultipleDevices) as generic types are.
"""

for (generic_type, settings) in DeviceEventDomain.GENERIC_TYPES.items():
    Resource.create(generic_type, EventWithDevices, {}, EventSubSettingsMultipleDevices, settings)
Exemplo n.º 3
0
 def create_dummy_type_of_device(self):
     # todo this method will fail if TestResource is not the **first** test executed
     Resource.create(self.dummy_device_name, Device, self.dummy_device_class, DeviceSubSettings,
                     self.dummy_device_settings)
Exemplo n.º 4
0
from ereuse_devicehub.resources.event.device.domain import DeviceEventDomain
from ereuse_devicehub.resources.event.device.settings import EventWithDevices, EventSubSettingsMultipleDevices
from ereuse_devicehub.resources.resource import Resource

"""
    Registers the generic types for the events.

    This module creates as many Schema (extending from EventWithDevices) and Settings (extending from
    EventSubSettingsMultipleDevices) as generic types are.
"""

for (generic_type, settings) in list(DeviceEventDomain.GENERIC_TYPES.items()):
    Resource.create(generic_type, EventWithDevices, {}, EventSubSettingsMultipleDevices, settings)