Ejemplo n.º 1
0
 def test_verify_status_flags_zero(self, bacnet_obj_factory):
     verifier = BACnetVerifier(override_threshold=Priority.MANUAL_OPERATOR)
     bacnet_obj = bacnet_obj_factory(**{
         "103": "reliability",
         "verified_present_value": 85.8585
     })
     verified_obj = verifier.verify_status_flags(
         obj=bacnet_obj, status_flags=bacnet_obj.status_flags)
     assert id(verified_obj) == id(bacnet_obj)
     assert verified_obj.status_flags.flags == 0b0000
     assert verified_obj.reliability == Reliability.NO_FAULT_DETECTED
Ejemplo n.º 2
0
 def test_verify_status_flags_null_verified_pv(self, bacnet_obj_factory):
     verifier = BACnetVerifier(override_threshold=Priority.MANUAL_OPERATOR)
     bacnet_obj = bacnet_obj_factory(
         **{
             "103": "reliability",
             "111": [True, False, False, False],
             "verified_present_value": "null",
         })
     verified_obj = verifier.verify_status_flags(
         obj=bacnet_obj, status_flags=bacnet_obj.status_flags)
     assert id(verified_obj) == id(bacnet_obj)
     assert verified_obj.status_flags.flags == 0b1100
     assert verified_obj.reliability == "reliability"