mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Completed test coverage for createsuperuser command.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f08651c06c
commit
67c34c1a37
@@ -312,6 +312,19 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
|
||||
# created password should be unusable
|
||||
self.assertFalse(u.has_usable_password())
|
||||
|
||||
def test_validate_username(self):
|
||||
msg = (
|
||||
"Enter a valid username. This value may contain only letters, numbers, "
|
||||
"and @/./+/-/_ characters."
|
||||
)
|
||||
with self.assertRaisesMessage(CommandError, msg):
|
||||
call_command(
|
||||
"createsuperuser",
|
||||
interactive=False,
|
||||
username="🤠",
|
||||
email="joe@somewhere.org",
|
||||
)
|
||||
|
||||
def test_non_ascii_verbose_name(self):
|
||||
@mock_inputs(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user