コード例 #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)
コード例 #2
0
ファイル: generic_settings.py プロジェクト: eReuse/DeviceHub
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)
コード例 #3
0
ファイル: test_resource.py プロジェクト: eReuse/DeviceHub
 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)
コード例 #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)