#NEWLINE# def test_login_with_disabled_tenant( self ) : #NEWLINE# #INDENT# tenants = [ self . data . tenant_two , self . data . tenant_one ] #NEWLINE# user = self . data . user #NEWLINE# unscoped = self . data . unscoped_access_info #NEWLINE# form_data = self . get_form_data ( user ) #NEWLINE# self . _mock_unscoped_client_list_tenants ( user , tenants ) #NEWLINE# self . _mock_scoped_client_for_tenant ( unscoped , self . data . tenant_one . id ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# url = reverse ( 'login' ) #NEWLINE# response = self . client . get ( url , form_data ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# response = self . client . post ( url , self ) #NEWLINE# self . assertRedirects ( response , settings . LOGIN_REDIRECT_URL )