#NEWLINE# def test_registration_no_sites( self ) : #NEWLINE# #INDENT# '\n        Test that registration still functions properly when\n        ``django.contrib.sites`` is not installed; the fallback will\n        be a ``RequestSite`` instance.\n        \n        ' #NEWLINE# Site . _meta . installed = False #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 ( self . 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 ) #NEWLINE# Site . _meta . installed = True