#NEWLINE# def test_nested_where( self ) : #NEWLINE# #INDENT# nested_query = self . get_builder ( ) #NEWLINE# nested_raw_query = self . get_mock_query_builder ( ) #NEWLINE# nested_query . get_query = mock . MagicMock ( return_value = nested_raw_query ) #NEWLINE# model = self . get_mock_model ( ) #NEWLINE# builder = self . get_builder ( ) #NEWLINE# builder . set_model ( model ) #NEWLINE# builder . get_query ( ) . add_nested_where_query = mock . MagicMock ( ) #NEWLINE# result = builder . where ( nested_query ) #NEWLINE# self . assertEqual ( builder , result ) #NEWLINE# builder . get_query ( ) . add_nested_where_query . assert_called_once_with ( nested_raw_query , 'and' )