#NEWLINE# def test_get_create_ok( self ) : #NEWLINE# #INDENT# from pyshop.views.account import Create #NEWLINE# from pyshop.models import User , Group #NEWLINE# view = Create ( self . create_request ( ) ) ( ) #NEWLINE# self . assertEqual ( set ( view . keys ( ) ) , set ( [ 'errors' , 'groups' , 'pyshop' , 'user' ] ) ) #NEWLINE# self . assertEqual ( view [ 'errors' ] , [ ] ) #NEWLINE# groups = [ g for g in view [ 'groups' ] ] #NEWLINE# self . assertEqual ( len ( groups ) , 3 ) #NEWLINE# self . assertIsInstance ( groups [ 0 ] , Group ) #NEWLINE# self . assertIsInstance ( view [ 'user' ] , User ) #NEWLINE# self . assertIsNone ( view [ 'user' ] . id ) #NEWLINE# self . assertIsNone ( view [ 'user' ] . login )