From d420f1d5a21f15ec7393a336189c6cf3045b2c94 Mon Sep 17 00:00:00 2001 From: Lex Li Date: Mon, 5 Feb 2024 00:54:14 -0500 Subject: [PATCH] Fixed test case results to match latest agent. --- .../asyncio/manager/cmdgen/test_usm_sha_aes128.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/hlapi/asyncio/manager/cmdgen/test_usm_sha_aes128.py b/tests/hlapi/asyncio/manager/cmdgen/test_usm_sha_aes128.py index 04cd7c4a9..3e8dd20c4 100644 --- a/tests/hlapi/asyncio/manager/cmdgen/test_usm_sha_aes128.py +++ b/tests/hlapi/asyncio/manager/cmdgen/test_usm_sha_aes128.py @@ -1,6 +1,6 @@ import pytest from pysnmp.hlapi.asyncio import * -from pysnmp.proto.errind import RequestTimedOut, UnknownUserName +from pysnmp.proto.errind import DecryptionError, RequestTimedOut, UnknownUserName @pytest.mark.asyncio async def test_usm_sha_aes128(): @@ -46,8 +46,8 @@ async def test_usm_sha_aes128_wrong_auth(): ObjectType(ObjectIdentity("SNMPv2-MIB", "sysDescr", 0)), ) - assert isinstance(errorIndication, RequestTimedOut) - assert str(errorIndication) == 'No SNMP response received before timeout' + assert isinstance(errorIndication, DecryptionError) + assert str(errorIndication) == 'Ciphering services not available or ciphertext is broken' snmpEngine.transportDispatcher.closeDispatcher() @@ -69,8 +69,8 @@ async def test_usm_sha_aes128_wrong_priv(): ObjectType(ObjectIdentity("SNMPv2-MIB", "sysDescr", 0)), ) - assert isinstance(errorIndication, RequestTimedOut) - assert str(errorIndication) == 'No SNMP response received before timeout' + assert isinstance(errorIndication, DecryptionError) + assert str(errorIndication) == 'Ciphering services not available or ciphertext is broken' snmpEngine.transportDispatcher.closeDispatcher()