#NEWLINE# @ staticmethod #NEWLINE# def new_user( **kwargs ) : #NEWLINE# #INDENT# u = User ( username = kwargs . pop ( 'username' , 'testuser' ) , email = kwargs . pop ( 'email' , 'test@user.in' ) ) #NEWLINE# u . set_password ( kwargs . pop ( 'password' , 'test' ) ) #NEWLINE# u . first_name = kwargs . pop ( 'first_name' , 'Test' ) #NEWLINE# u . last_name = kwargs . pop ( 'last_name' , 'User' ) #NEWLINE# for ( attr , value ) in kwargs . items ( ) : #NEWLINE# #INDENT# setattr ( u , value , value ) #NEWLINE# #UNINDENT# u . save ( ) #NEWLINE# return u