| 1 |
# SPDX-License-Identifier: MPL-2.0 |
| 2 |
|
| 3 |
from test.common.classes import TestClasses |
| 4 |
|
| 5 |
from cryptodatahub.dnsrec.algorithm import DnsRrType, DnsSecAlgorithm, DnsSecDigestType |
| 6 |
|
| 7 |
|
| 8 |
class TestDnsRrType(TestClasses.TestJsonCodeNumericBase): |
| 9 |
@classmethod |
| 10 |
def _get_class(cls): |
| 11 |
return DnsRrType |
| 12 |
|
| 13 |
def test_name(self): |
| 14 |
self.assertEqual(str(DnsRrType.CAA.value), 'CAA') |
| 15 |
|
| 16 |
|
| 17 |
class TestDnsSecAlgorithm(TestClasses.TestJsonCodeNumericBase): |
| 18 |
@classmethod |
| 19 |
def _get_class(cls): |
| 20 |
return DnsSecAlgorithm |
| 21 |
|
| 22 |
def test_name(self): |
| 23 |
self.assertEqual(str(DnsSecAlgorithm.RSAMD5.value), 'RSA/MD5') |
| 24 |
|
| 25 |
|
| 26 |
class TestDnsSecDigestType(TestClasses.TestJsonCodeNumericBase): |
| 27 |
@classmethod |
| 28 |
def _get_class(cls): |
| 29 |
return DnsSecDigestType |
| 30 |
|
| 31 |
def test_name(self): |
| 32 |
self.assertEqual(str(DnsSecDigestType.SHA_256.value), 'SHA-256') |