Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pergolafabio committed Jan 19, 2024
1 parent e2ef3bb commit b3f3422
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hikvision-doorbell/src/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ class DeviceTriggerMetadata(TypedDict):
VideoInterComAlarmType.SMART_LOCK_LOW_BATTERY_ALARM: DeviceTriggerMetadata(name='smart_lock_low_battery_alarm', type='smart lock alarm', subtype='low battery'),
VideoInterComAlarmType.BLACKLIST_ALARM: DeviceTriggerMetadata(name='smart_lock_blacklist_alarm', type='alarm', subtype='blacklist'),
VideoInterComAlarmType.SMART_LOCK_DISCONNECTED: DeviceTriggerMetadata(name='smart_lock_disconnected', type='smart lock disconnected', subtype=''),
VideoInterComAlarmType.ACCESS_CONTROL_TAMPERING_ALARM: DeviceTriggerMetadata(name='access_control_tampering_alarm', type='alarm', subtype='access control tampering'),
VideoInterComAlarmType.DOOR_OPEN_BY_EXTERNAL_FORCE: DeviceTriggerMetadata(name='door_open_by_external_force', type='alarm', subtype='door open by external force'),
VideoInterComAlarmType.ACCESS_CONTROL_TAMPERING_ALARM: DeviceTriggerMetadata(name='access_control_tampering_alarm', type='alarm', subtype='access control tampering alarm'),
VideoInterComAlarmType.DOOR_OPEN_BY_EXTERNAL_FORCE: DeviceTriggerMetadata(name='door_open_by_external_force', type='force', subtype='door open by external force'),
}
"""Define the attributes of each DeviceTrigger entity, indexing them by the enum VideoInterComAlarmType"""

Expand Down
1 change: 0 additions & 1 deletion hikvision-doorbell/src/sdk/hcnetsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ class VideoInterComAlarmType(IntEnum):
DRESSING_REMINDER = 26
FACE_TEMPERATURE_ALARM = 27
DRESSING_REMINDER_CANCELLED = 28


class DeviceCapabilityType(Enum):
DEVICE_VIDEOPIC_ABILITY = 0x00e
Expand Down
11 changes: 10 additions & 1 deletion hikvision-doorbell/tests/test_mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,16 @@ def test_all_alarm_types(self, mocked_doorbell: Doorbell, handler: MQTTHandler,
VideoInterComAlarmType.DOOR_NOT_CLOSED,
VideoInterComAlarmType.ZONE_ALARM,
VideoInterComAlarmType.DOORBELL_RINGING,
VideoInterComAlarmType.DISMISS_INCOMING_CALL
VideoInterComAlarmType.DISMISS_INCOMING_CALL,
VideoInterComAlarmType.SOS_CANCELLED,
VideoInterComAlarmType.NO_MASK_ALARM,
VideoInterComAlarmType.FIRE_INPUT_ALARM,
VideoInterComAlarmType.FIRE_INPUT_RESTORED,
VideoInterComAlarmType.TOILET_ALARM,
VideoInterComAlarmType.TOILET_ALARM_CANCELLED,
VideoInterComAlarmType.DRESSING_REMINDER,
VideoInterComAlarmType.FACE_TEMPERATURE_ALARM,
VideoInterComAlarmType.DRESSING_REMINDER_CANCELLED
):
pytest.skip("Tested in another function")
video_intercom_alarm = mocker.patch("sdk.hcnetsdk.NET_DVR_VIDEO_INTERCOM_ALARM")
Expand Down

0 comments on commit b3f3422

Please sign in to comment.