TestNet¶
-
class
tests.test_net.
TestNet
(*args, **kwargs)[source]¶ Test cases related to
privex.helpers.net
or generally network related functions-
__init__
(*args, **kwargs)[source] 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 asn_to_name returns ‘Unknown ASN’ when quiet, otherwise throws a KeyError for ASN ‘nonexistent’ |
|
Test asn_to_name returns ‘Unknown ASN’ when quiet, otherwise throws KeyError for the ASN 999999999 |
|
Test Privex’s ASN (as an int) 210083 resolves to ‘PRIVEX, SE’ |
|
Test Cloudflare’s ASN (as a str) ‘13335’ resolves to ‘CLOUDFLARENET - Cloudflare, Inc., US’ |
|
Test success & failure cases for ping function with IPv4, as well as input validation |
|
Test success & failure cases for ping function with IPv6, as well as input validation |