Skip to content
Myr

Additional tests added

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kamil Madac · committed by Kamil Madac · parent 9472481 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • other:+12 added−0 removed

1 file+12 added−0 removed

modified:test_requests.py+12 added
937 unmodified lines
938 from requests.utils import is_ipv4_network939 assert not is_ipv4_network('8.8.8.8')940 assert is_ipv4_network('192.168.1.0/24')941942 def test_dotted_netmask(self):943 from requests.utils import dotted_netmask944 assert dotted_netmask(8) == '255.0.0.0'945 assert dotted_netmask(24) == '255.255.255.0'946 assert dotted_netmask(25) == '255.255.255.128'947948 def test_address_in_network(self):949 from requests.utils import address_in_network950 assert address_in_network('192.168.1.1', '192.168.1.0/24')951 assert not address_in_network('172.16.0.1', '192.168.1.0/24')952953954if __name__ == '__main__':955 unittest.main()