Beispiel #1
0
    def test_triple_attribs(self):
        template = ET.fromstring("""
                <triple subj="X" pred="Y" obj="Z" >
                </triple>
            """)

        triple = TemplateTripleNode("triple")
        triple.parse_expression(self._graph, template)
Beispiel #2
0
    def test_triple(self):
        template = ET.fromstring("""
			    <triple>
			        <subj>X</subj>
			        <pred>Y</pred>
			        <obj>Z</obj>
			    </triple>
			""")

        triple = TemplateTripleNode("triple")
        triple.parse_expression(self._graph, template)
Beispiel #3
0
    def test_triple(self):
        template = ET.fromstring("""
			    <triple>
			        <subj>X</subj>
			        <pred>Y</pred>
			        <obj>Z</obj>
			        <id/>
			    </triple>
			""")

        triple = TemplateTripleNode("triple")
        with self.assertRaises(ParserException):
            triple.parse_expression(self._graph, template)