TestIPReverseDNS

class tests.test_rdns.TestIPReverseDNS(methodName='runTest')[source]

Unit testing for the reverse DNS functions in privex.helpers.net

Covers:
  • positive resolution tests (generate standard rDNS domain from clean input)

  • positive boundary tests (confirm valid results with range of boundaries)

  • negative address tests (ensure errors thrown for invalid v4/v6 addresses)

  • negative boundary tests (ensure errors thrown for invalid v4/v6 rDNS boundaries)

__init__(methodName='runTest')

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

Methods

Methods

test_v4_arpa_boundary_16bit()

Test generating 16-bit v4 boundary

test_v4_arpa_boundary_24bit()

Test generating 24-bit v4 boundary

test_v4_inv_boundary()

Raise if IPv4 boundary isn’t divisable by 8

test_v4_inv_boundary_2()

Raise if IPv4 boundary is too short

test_v4_invalid()

Raise if IPv4 address has < 4 octets

test_v4_invalid_2()

Raise if IPv4 address has octet out of range

test_v4_to_arpa()

Test generating rDNS for standard v4

test_v6_arpa_boundary_16bit()

Test generating 16-bit v6 boundary

test_v6_arpa_boundary_32bit()

Test generating 32-bit v6 boundary

test_v6_inv_boundary()

Raise if IPv6 boundary isn’t dividable by 4

test_v6_inv_boundary_2()

Raise if IPv6 boundary is too short

test_v6_invalid()

Raise if IPv6 address has invalid block formatting

test_v6_invalid_2()

Raise if v6 address has invalid chars

test_v6_to_arpa()

Test generating rDNS for standard v6

Attributes

Attributes