diff --git a/satori/common/templating.py b/satori/common/templating.py index 2929348..ce7e4dd 100644 --- a/satori/common/templating.py +++ b/satori/common/templating.py @@ -116,7 +116,7 @@ def parse(template, extra_globals=None, env_vars=None, **kwargs): try: result = template.render(**minimum_kwargs) - #TODO(zns): exceptions in Jinja template sometimes missing traceback + # TODO(zns): exceptions in Jinja template sometimes missing traceback except jinja2.TemplateError as exc: LOG.error(exc, exc_info=True) error_message = "Template had an error: %s" % exc diff --git a/satori/discovery.py b/satori/discovery.py index e60c065..f0864db 100644 --- a/satori/discovery.py +++ b/satori/discovery.py @@ -55,7 +55,7 @@ def run(target, config=None, interactive=False): hostname = dns.parse_target_hostname(target) found['hostname'] = hostname ip_address = six.text_type(dns.resolve_hostname(hostname)) - #TODO(sam): Use ipaddress.ip_address.is_global + # TODO(sam): Use ipaddress.ip_address.is_global # " .is_private # " .is_unspecified # " .is_multicast diff --git a/satori/tests/test_dns.py b/satori/tests/test_dns.py index a8a5685..67bd193 100644 --- a/satori/tests/test_dns.py +++ b/satori/tests/test_dns.py @@ -120,7 +120,7 @@ class TestDNS(utils.TestCase): patcher = mock.patch.object(pythonwhois.net, 'get_whois_raw') self.mock_get_whois_raw = patcher.start() - self.mock_get_whois_raw.return_value = self.WHOIS + self.mock_get_whois_raw.return_value = self.WHOIS, [None] self.addCleanup(patcher.stop) super(TestDNS, self).setUp() @@ -187,7 +187,7 @@ class TestDNS(utils.TestCase): NS 1 : dns1.example.com NS 2 : dns2.example.com """] - self.mock_get_whois_raw.return_value = small_whois + self.mock_get_whois_raw.return_value = small_whois, [None] data = dns.domain_info(self.domain) self.assertEqual( [], @@ -224,7 +224,7 @@ class TestDNS(utils.TestCase): NS 1 : dns1.example.com NS 2 : dns2.example.com """] - self.mock_get_whois_raw.return_value = small_whois + self.mock_get_whois_raw.return_value = small_whois, [None] data = dns.domain_info(self.domain) self.assertEqual( data['days_until_expires'], @@ -244,7 +244,7 @@ class TestDNS(utils.TestCase): NS 1 : dns1.example.com NS 2 : dns2.example.com """] - self.mock_get_whois_raw.return_value = small_whois + self.mock_get_whois_raw.return_value = small_whois, [None] data = dns.domain_info(self.domain) self.assertIsInstance(data['expiration_date'], six.string_types) @@ -260,7 +260,7 @@ class TestDNS(utils.TestCase): NS 1 : dns1.example.com NS 2 : dns2.example.com """] - self.mock_get_whois_raw.return_value = small_whois + self.mock_get_whois_raw.return_value = small_whois, [None] data = dns.domain_info(self.domain) self.assertIsNone(data['expiration_date']) @@ -269,7 +269,7 @@ class TestDNS(utils.TestCase): Home net HOME-NET-192-168 (NET-192-0-0-0-1) Home Inc. HOME-NET-192-168-0 (NET-192-168-0-0-1) """] - self.mock_get_whois_raw.return_value = ip_whois + self.mock_get_whois_raw.return_value = ip_whois, [None] self.assertRaises( errors.SatoriInvalidDomain, dns.domain_info, diff --git a/test-requirements.txt b/test-requirements.txt index 492f96e..3ab29ab 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,9 +1,6 @@ -# pep8 with support for empty files through flake8 --e git://github.com/ziadsawalha/pep8.git@19b64e1d6b52cb814e482188369f4db24e0e82c2#egg=pep8 - -# Newer hacking -# Includes two fixes for handling blank lines in files and for handling egg-linked libraries --e git://github.com/ziadsawalha/hacking.git@76ff3d0c8b116df147b7e4ca00afda67a9537f2a#egg=hacking +# Includes fixes for handling egg-linked libraries +# and detection of stdlibs in virtualenvs +-e git://github.com/samstav/hacking.git@satori#egg=hacking coverage>=3.6 discover @@ -11,6 +8,7 @@ flake8_docstrings>=0.2.0 # patched for py33 fixtures>=0.3.14 freezegun mock>=1.0 +pep8>=1.5.7 pep257>=0.3.2 # patched for py33 sphinx>=1.2.2 testrepository>=0.0.17