summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorEd Morley <edmorley@users.noreply.github.com>2017-01-27 18:30:27 +0000
committerTim Graham <timograham@gmail.com>2017-01-27 13:30:27 -0500
commit751d77cdd924c5380532d231f95c1bd2f34960d5 (patch)
tree031a77adc011c43610816ef4f5d89624d6c3b0b3 /tests/admin_scripts/tests.py
parent0cbfc844a392ae3fd47cc2cf28ba872f19f1d301 (diff)
Refs #27537 -- Added default_addr(_ipv6) attributes to runserver command.
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index ad7d9ef742..177d24892a 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1311,6 +1311,18 @@ class ManageRunserver(AdminScriptTestCase):
call_command(self.cmd, addrport="test.domain.local:7000", use_ipv6=True)
self.assertServerSettings('test.domain.local', '7000', ipv6=True)
+ def test_runner_custom_defaults(self):
+ self.cmd.default_addr = '0.0.0.0'
+ self.cmd.default_port = '5000'
+ call_command(self.cmd)
+ self.assertServerSettings('0.0.0.0', '5000')
+
+ @unittest.skipUnless(socket.has_ipv6, "platform doesn't support IPv6")
+ def test_runner_custom_defaults_ipv6(self):
+ self.cmd.default_addr_ipv6 = '::'
+ call_command(self.cmd, use_ipv6=True)
+ self.assertServerSettings('::', '8000', ipv6=True, raw_ipv6=True)
+
def test_runner_ambiguous(self):
# Only 4 characters, all of which could be in an ipv6 address
call_command(self.cmd, addrport="beef:7654")