def test_createsuperuser_username_validation(input): responses = ['', 'myusername'] input.side_effect = lambda *args: responses.pop(0) command = CreateSuperUser() assert command.get_value('username') == 'myusername'
def test_createsuperuser_email_validation(input): responses = ['', 'myemail', '*****@*****.**'] input.side_effect = lambda *args: responses.pop(0) command = CreateSuperUser() assert command.get_value('email') == '*****@*****.**'