Mercurial > code > home > repos > homeauto
comparison service/mqtt_to_rdf/inference_test.py @ 1692:2883da14847c
debugging and cleanup, as i looked for a bug
author | drewp@bigasterisk.com |
---|---|
date | Sat, 25 Sep 2021 22:20:00 -0700 |
parents | aa35ae7a1acc |
children | 73abfd4cf5d0 |
comparison
equal
deleted
inserted
replaced
1691:37710d28890b | 1692:2883da14847c |
---|---|
402 ''') | 402 ''') |
403 | 403 |
404 def testRemap(self): | 404 def testRemap(self): |
405 inf = makeInferenceWithRules(''' | 405 inf = makeInferenceWithRules(''' |
406 { | 406 { |
407 ?sensor a :AirQualitySensor; :label ?name . | 407 ?sensor a :AirQualitySensor; :label ?name . |
408 (:mqttSource ?name) :childResource ?base . | 408 (:mqttSource ?name) :childResource ?base . |
409 } => { | 409 } => { |
410 ?sensor :statementSourceBase ?base . | 410 ?sensor :statementSourceBase ?base . |
411 } . | 411 } . |
412 ''') | 412 ''') |
413 out = inf.infer(N3(''' | 413 out = inf.infer(N3(''' |
414 :airQualityIndoor a :AirQualitySensor; :label "air_quality_indoor" . | 414 :airQualityIndoor a :AirQualitySensor; :label "air_quality_indoor" . |
415 :airQualityOutdoor a :AirQualitySensor; :label "air_quality_outdoor" . | 415 :airQualityOutdoor a :AirQualitySensor; :label "air_quality_outdoor" . |