def test_object_identifier_tag(self):
        if _debug: TestObjectIdentifier._debug("test_object_identifier_tag")

        tag = Tag(Tag.applicationTagClass, Tag.objectIdentifierAppTag, 1, xtob('06000003'))
        obj = ObjectIdentifier(tag)
        assert obj.value == ('pulseConverter', 3)

        tag = Tag(Tag.applicationTagClass, Tag.booleanAppTag, 0, xtob(''))
        with self.assertRaises(InvalidTag):
            ObjectIdentifier(tag)

        tag = Tag(Tag.contextTagClass, 0, 1, xtob('ff'))
        with self.assertRaises(InvalidTag):
            ObjectIdentifier(tag)

        tag = Tag(Tag.openingTagClass, 0)
        with self.assertRaises(InvalidTag):
            ObjectIdentifier(tag)
dataset/ETHPy150Open JoelBender/bacpypes/tests/test_primitive_data/test_object_identifier.py/TestObjectIdentifier.test_object_identifier_tag/original