示例#1
0
    async def test_action_not_exists(self):
        r = UpnpTestRequester(RESPONSE_MAP)
        factory = UpnpFactory(r)
        device = await factory.async_create_device('http://localhost:1234/dmr')
        event_handler = UpnpEventHandler('http://localhost:11302', r)
        profile = DmrDevice(device, event_handler=event_handler)

        # doesn't error
        assert profile._action('RC', 'NonExisting') is None
示例#2
0
    async def test_action_not_exists(self):
        """Test getting non-existing action."""
        r = UpnpTestRequester(RESPONSE_MAP)
        factory = UpnpFactory(r)
        device = await factory.async_create_device("http://localhost:1234/dmr")
        event_handler = UpnpEventHandler("http://localhost:11302", r)
        profile = DmrDevice(device, event_handler=event_handler)

        # doesn't error
        assert profile._action("RC", "NonExisting") is None