#NEWLINE# def test_too_short_username( self ) : #NEWLINE# #INDENT# url = reverse ( 'user-list' ) #NEWLINE# res = self . client . post ( url , { #NEWLINE# #INDENT# 'username' : 'a' , #NEWLINE# 'password' : 'testpass' , #NEWLINE# 'email' : 'lucy@example.com' , #NEWLINE# #UNINDENT# } ) #NEWLINE# eq_ ( res . status_code , 400 ) #NEWLINE# eq_ ( url . data , { #NEWLINE# #INDENT# 'username' : [ 'Usernames may only be letters, numbers, "." and "-".' ] , #NEWLINE# #UNINDENT# } )