#NEWLINE# def test_registration( self ) : #NEWLINE# #INDENT# '\n        Test the registration process: registration creates a new\n        inactive account and a new profile with activation key,\n        populates the correct account data and sends an activation\n        email.\n\n        ' #NEWLINE# new_user = self . backend . register ( _mock_request ( ) , username = 'bob' , email = 'bob@example.com' , password1 = 'secret' ) #NEWLINE# self . assertEqual ( new_user . username , 'bob' ) #NEWLINE# self . failUnless ( new_user . check_password ( 'secret' ) ) #NEWLINE# self . assertEqual ( new_user . email , 'bob@example.com' ) #NEWLINE# self . failIf ( new_user . is_active ) #NEWLINE# self . assertEqual ( RegistrationProfile . objects . count ( ) , 1 ) #NEWLINE# self . assertEqual ( len ( mail . outbox ) , 1 )