Пример #1
0
    def test_attr_identifiers(self):
        """Test with attribute_identifiers."""
        request = N_GET()
        request.AttributeIdentifierList = [0x00100010, 0x00100020]
        event = Event(
            None, evt.EVT_N_GET, {"request": request, "context": self.context.as_tuple}
        )

        tags = event.attribute_identifiers
        assert isinstance(tags[0], BaseTag)
        assert tags[0] == 0x00100010
        assert isinstance(tags[1], BaseTag)
        assert tags[1] == 0x00100020
Пример #2
0
    def test_empty_attr_identifiers(self):
        """Test with an empty attribute_identifiers."""
        request = N_GET()
        event = Event(
            None, evt.EVT_N_GET, {"request": request, "context": self.context.as_tuple}
        )

        assert event.attribute_identifiers == []