Closed gdbassett closed 11 years ago
event1 = { "dces_version":"0.2", "an":{ "A":{"label":"A Required Attribute","class":"attribute","start":"2013-03-14T16:57Z","cpt":{"nodeid":"A","index":[True,False],"0":[1,0]},"comment":"This attribute is required"}, "B":{"label":"An Event Happens","class":"event","start":"2013-03-14T16:57Z","cpt":{"nodeid":"B","index":[True,False],"0":[1,0]},"comment":"An event happens. This should have parents, but we're not going to bother"}, "C":{"label":"resulting condition","class":"condition","start":"2013-03-14T16:57Z","cpt":{"nodeid":"C","index":["A","B",True,False],"0":[0,0,0,1],"1":[0,0,0,1],"2":[0,0,0,1],"3":[0,0,1,0]}, "comment":"Because of the Attribute and Event, this condition happens."}, "D":{"label":"A previously unrequired attribute","class":"attribute","start":"2013-03-14T16:57Z","cpt":{"nodeid":"D","index":[True,False],"0":[1,0]},"comment":"This attribute isnt in C's CPT"}, "E":{"label":"A previously unrequired Event","class":"event","start":"2013-03-14T16:57Z","cpt":{"nodeid":"E","index":[True,False],"0":[1,0]},"comment":"An event isn't in E's CPT but will be linked by an edge. This should have parents, but we're not going to bother"} }, "ae":{ "1":{"source":"A","target":"C","directed":True, "relationship":"influences","start":"2013-03-14T16:57Z", "comment":"Connects attribute to condition"}, "2":{"source":"B","target":"C","directed":True, "relationship":"leads to","start":"2013-03-14T16:57Z","comment":"connects event to condition"} } }
event2 = { "dces_version":"0.2", "ae":{ "1":{"source":idMap["D"],"target":idMap["C"],"directed":True, "relationship":"influences","start":"2013-03-14T16:57Z", "comment":"Connects attribute to condition"}, "2":{"source":idMap["E"],"target":idMap["C],"directed":True, "relationship":"leads to","start":"2013-03-14T16:57Z","comment":"connects event to condition"} } }
event3 = {"dces_version":"0.2","de":{"1":{"source":int(idMap["A"]),"target":int(idMap["C"])},"2":{"source":int(idMap["B"]),"target":int(idMap["C"])}}}
event1 = {"dces_version":"0.2","an":{"A":{"label":"A Required Attribute","class":"attribute","start":"2013-03-14T16:57Z","cpt":{"nodeid":"A","index":[true,false],"0":[1,0]},"comment":"This attribute is required"},"B":{"label":"An Event Happens","class":"event","start":"2013-03-14T16:57Z","cpt":{"nodeid":"B","index":[true,false],"0":[1,0]},"comment":"An event happens. This should have parents, but we're not going to bother"},"C":{"label":"resulting condition","class":"condition","start":"2013-03-14T16:57Z","cpt":{"nodeid":"C","index":["A","B",true,false],"0":[0,0,0,1],"1":[0,0,0,1],"2":[0,0,0,1],"3":[0,0,1,0]}, "comment":"Because of the Attribute and Event, this condition happens."},"D":{"label":"A previously unrequired attribute","class":"attribute","start":"2013-03-14T16:57Z","cpt":{"nodeid":"D","index":[true,false],"0":[1,0]},"comment":"This attribute isnt in C's CPT"},"E":{"label":"A previously unrequired Event","class":"event","start":"2013-03-14T16:57Z","cpt":{"nodeid":"E","index":[true,false],"0":[1,0]},"comment":"An event isn't in E's CPT but will be linked by an edge. This should have parents, but we're not going to bother"}},"ae":{"1":{"source":"A","target":"C","directed":true, "relationship":"influences","start":"2013-03-14T16:57Z", "comment":"Connects attribute to condition"},"2":{"source":"B","target":"C","directed":true, "relationship":"leads to","start":"2013-03-14T16:57Z","comment":"connects event to condition"}}}
event2 = {"dces_version":"0.2","ae":{"1":{"source":idMap["D"],"target":idMap["C"],"directed":true, "relationship":"influences","start":"2013-03-14T16:57Z", "comment":"Connects attribute to condition"},"2":{"source":idMap["E"],"target":idMap["C"],"directed":true, "relationship":"leads to","start":"2013-03-14T16:57Z","comment":"connects event to condition"}}}
event3 = {"dces_version":"0.2","de":{"1":{"source":int(idMap["A"]),"target":int(idMap["C"])},"2":{"source":int(idMap["B"]),"target":int(idMap["C"])}}}
fixCPTs and updateCPTs functions tested. validateCPT function left to be validated.
Finished with commit 378fa150956a771363cfa55db3c28041dfecd9b9
A CPT validation client is written.
All CPT Validation/update functions are tested.