From da4bbed5d7bb3359d569d4421e8c119cb2a37e92 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman Date: Wed, 24 Dec 2014 17:14:33 -0500 Subject: [PATCH] update tests for django >1.6, disable integration tests until I can figure out a good local solution --- binder/tests/__init__.py | 6 ------ .../{integration.py => disabled_testIntegration.py} | 0 binder/tests/{forms.py => testForms.py} | 0 binder/tests/{helpers.py => testHelpers.py} | 7 ++----- binder/tests/{models.py => testModels.py} | 0 binder/tests/{views.py => testViews.py} | 13 ------------- 6 files changed, 2 insertions(+), 24 deletions(-) rename binder/tests/{integration.py => disabled_testIntegration.py} (100%) rename binder/tests/{forms.py => testForms.py} (100%) rename binder/tests/{helpers.py => testHelpers.py} (54%) rename binder/tests/{models.py => testModels.py} (100%) rename binder/tests/{views.py => testViews.py} (85%) diff --git a/binder/tests/__init__.py b/binder/tests/__init__.py index e6792b2..e69de29 100644 --- a/binder/tests/__init__.py +++ b/binder/tests/__init__.py @@ -1,6 +0,0 @@ -from forms import * -from helpers import * -from models import * -from views import * - -from integration import * diff --git a/binder/tests/integration.py b/binder/tests/disabled_testIntegration.py similarity index 100% rename from binder/tests/integration.py rename to binder/tests/disabled_testIntegration.py diff --git a/binder/tests/forms.py b/binder/tests/testForms.py similarity index 100% rename from binder/tests/forms.py rename to binder/tests/testForms.py diff --git a/binder/tests/helpers.py b/binder/tests/testHelpers.py similarity index 54% rename from binder/tests/helpers.py rename to binder/tests/testHelpers.py index d96d9c7..6bb011a 100644 --- a/binder/tests/helpers.py +++ b/binder/tests/testHelpers.py @@ -7,10 +7,7 @@ class HelperTests(TestCase): response = helpers.ip_info("foobar.doesnotexist.local") self.assertEqual([['Error', u'Unable to resolve foobar.doesnotexist.local: [Errno -2] Name or service not known']], response) - # The following is currently the first globally unique IPv4 and IPv6 address I could find - # that did not change based upon your geography. - # http://test-ipv6.com/ - response = helpers.ip_info("ds.test-ipv6.com") - self.assertEqual([['IPv4 (1)', u'216.218.228.114'], ['IPv6 (1)', u'2001:470:1:18::2']], + response = helpers.ip_info("time1.google.com") + self.assertEqual([['IPv4 (1)', u'216.239.32.15'], ['IPv6 (1)', u'2001:4860:4802:32::f']], response) diff --git a/binder/tests/models.py b/binder/tests/testModels.py similarity index 100% rename from binder/tests/models.py rename to binder/tests/testModels.py diff --git a/binder/tests/views.py b/binder/tests/testViews.py similarity index 85% rename from binder/tests/views.py rename to binder/tests/testViews.py index c62585a..4954f35 100644 --- a/binder/tests/views.py +++ b/binder/tests/testViews.py @@ -78,16 +78,3 @@ class PostTests(TestCase): self.assertContains(response, '', html=True) - - -class HelperTests(TestCase): - def test_ipinfo_ResolutionFail(self): - response = helpers.ip_info("foobar.doesnotexist.local") - self.assertEqual([['Error', u'Unable to resolve foobar.doesnotexist.local: [Errno -2] Name or service not known']], - response) - # The following is currently the first globally unique IPv4 and IPv6 address I could find - # that did not change based upon your geography. - # http://test-ipv6.com/ - response = helpers.ip_info("ds.test-ipv6.com") - self.assertEqual([['IPv4 (1)', u'216.218.228.114'], ['IPv6 (1)', u'2001:470:1:18::2']], - response)