Merge branch 'fix-failing-tests' of https://github.com/Dunedan/binder into Dunedan-404-for-not-existing-servers
This commit is contained in:
commit
12654bd3a5
|
@ -7,7 +7,6 @@ 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)
|
||||
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)
|
||||
|
||||
response = helpers.ip_info("localhost")
|
||||
self.assertEqual([['IPv4 (1)', u'127.0.0.1'], ['IPv6 (1)', u'::1']],
|
||||
sorted(response))
|
||||
|
|
|
@ -15,7 +15,7 @@ class Model_BindServer_Tests(TestCase):
|
|||
def test_BindServerMissingStatisticsPort(self):
|
||||
"""Attempt to add a BindServer without a statistics port."""
|
||||
bindserver_1 = models.BindServer(hostname="badtest1")
|
||||
with self.assertRaisesMessage(IntegrityError, "NOT NULL constraint failed: binder_bindserver.statistics_port"):
|
||||
with self.assertRaises(IntegrityError):
|
||||
bindserver_1.save()
|
||||
|
||||
def test_BindServerNonIntStatisticsPort(self):
|
||||
|
|
|
@ -41,6 +41,9 @@ class PostTests(TestCase):
|
|||
""" Unit Tests that exercise HTTP POST. """
|
||||
def setUp(self):
|
||||
self.client = Client()
|
||||
models.BindServer(hostname="testserver.test.net",
|
||||
statistics_port=1234).save()
|
||||
|
||||
|
||||
def test_DeleteRecordInitial_Empty(self):
|
||||
""" Ensure the initial deletion form works as expected with no RR list. """
|
||||
|
|
Loading…
Reference in New Issue