From b20bad14f5fe393b366d309f5a8d6287dff95fd4 Mon Sep 17 00:00:00 2001 From: Camilo Nova Date: Wed, 20 Jul 2016 12:10:42 -0500 Subject: [PATCH] Removed unneeded test --- axes/tests.py | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/axes/tests.py b/axes/tests.py index 6ffda8b..3cfadaa 100644 --- a/axes/tests.py +++ b/axes/tests.py @@ -232,7 +232,8 @@ class AccessAttemptTest(TestCase): self.assertContains(response, self.LOCKED_MESSAGE, status_code=403) def test_log_data_truncated(self): - """Tests that query2str properly truncates data to the max_length (default 1024) + """Tests that query2str properly truncates data to the + max_length (default 1024) """ # An impossibly large post dict extra_data = {string.ascii_letters * x: x for x in range(0, 1000)} @@ -250,28 +251,6 @@ class AccessAttemptTest(TestCase): self.assertEquals(response.get('Content-Type'), 'application/json') -class IPClassifierTest(TestCase): - def test_classify_private_ips(self): - """Tests whether is_valid_public_ip correctly classifies IPs as being - bot public and valid - """ - EXPECTED = { - 'foobar': False, # invalid - not octects - '192.168.0': False, # invalid - only 3 octets - '192.168.0.0': False, # private - '192.168.165.1': False, # private - '192.249.19.1': True, # public but 192 prefix - '10.0.201.13': False, # private - '172.15.12.1': True, # public but 172 prefix - '172.16.12.1': False, # private - '172.31.12.1': False, # private - '172.32.0.1': True, # public but 127 prefix - '200.150.23.5': True, # normal public - } - for ip_address, is_valid_public in six.iteritems(EXPECTED): - self.assertEqual(ip_address, is_valid_public) - - class UtilsTest(TestCase): def test_iso8601(self): """Tests iso8601 correctly translates datetime.timdelta to ISO 8601