def test_md5(self): ts = get_snmp_auth_algorithm_from_string('md5') self.assertEqual(ts, SnmpAuthAlgorithm.MD5)
def test_none_or_empty_type(self): ts = get_snmp_auth_algorithm_from_string(None) self.assertIsNone(ts) ts = get_snmp_auth_algorithm_from_string('') self.assertIsNone(ts)
def test_sha1(self): ts = get_snmp_auth_algorithm_from_string('sha1') self.assertEqual(ts, SnmpAuthAlgorithm.SHA1)
def test_invalid_status(self): with self.assertRaises(InvalidArgument): get_snmp_auth_algorithm_from_string('foo')