diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index 55c7869..b265740 100644
a
|
b
|
class BaseRunserverCommand(BaseCommand):
|
63 | 63 | raise CommandError('"%s" is not a valid IPv6 address.' % self.addr) |
64 | 64 | if not self.addr: |
65 | 65 | self.addr = self.use_ipv6 and '::1' or '127.0.0.1' |
| 66 | self._raw_ipv6 = bool(self.use_ipv6) |
66 | 67 | self.run(*args, **options) |
67 | 68 | |
68 | 69 | def run(self, *args, **options): |
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py
index ae37eb3..87a6877 100644
a
|
b
|
class ManageRunserver(AdminScriptTestCase):
|
1025 | 1025 | |
1026 | 1026 | # IPv6 |
1027 | 1027 | self.cmd.handle(addrport="", use_ipv6=True) |
1028 | | self.assertServerSettings('::1', '8000', ipv6=True) |
| 1028 | self.assertServerSettings('::1', '8000', ipv6=True, raw_ipv6=True) |
1029 | 1029 | |
1030 | 1030 | self.cmd.handle(addrport="7000", use_ipv6=True) |
1031 | | self.assertServerSettings('::1', '7000', ipv6=True) |
| 1031 | self.assertServerSettings('::1', '7000', ipv6=True, raw_ipv6=True) |
1032 | 1032 | |
1033 | 1033 | self.cmd.handle(addrport="[2001:0db8:1234:5678::9]:7000") |
1034 | 1034 | self.assertServerSettings('2001:0db8:1234:5678::9', '7000', ipv6=True, raw_ipv6=True) |
… |
… |
class ManageRunserver(AdminScriptTestCase):
|
1045 | 1045 | |
1046 | 1046 | # Potentially ambiguous |
1047 | 1047 | |
1048 | | # Only 4 characters, all of which coudl be in an ipv6 address |
| 1048 | # Only 4 characters, all of which could be in an ipv6 address |
1049 | 1049 | self.cmd.handle(addrport="beef:7654") |
1050 | 1050 | self.assertServerSettings('beef', '7654') |
1051 | 1051 | |