1 |
|
# -*-python-*- |
2 |
#(c): Matti J. Katila |
#(c): Matti J. Katila |
3 |
|
|
4 |
from org import fenfire |
from org import fenfire |
30 |
def testNewObjWithType(): |
def testNewObjWithType(): |
31 |
type = Nodes.get('This is a test type') |
type = Nodes.get('This is a test type') |
32 |
|
|
33 |
obj = RDFUtil.N(fen,type) |
obj = RDFUtil.N(fen.graph, type) |
34 |
|
|
35 |
assert type == fen.constgraph.find1_11X(obj, RDF.type) |
assert type == fen.constgraph.find1_11X(obj, RDF.type) |
36 |
assert obj == fen.constgraph.find1_X11(RDF.type, type) |
assert obj == fen.constgraph.find1_X11(RDF.type, type) |
40 |
assert type == it.next() |
assert type == it.next() |
41 |
assert 0 == it.hasNext() |
assert 0 == it.hasNext() |
42 |
|
|
43 |
assert 1 == RDFUtil.isNodeType(fen, obj, type) |
assert 1 == RDFUtil.isNodeType(fen.graph, obj, type) |