'Verifies InstanceList.get_by_filters calls correct DB function.'

@mock.patch.object(db, 'instance_get_all_by_filters_sort')
@mock.patch.object(db, 'instance_get_all_by_filters')
def test_get_all_by_filters_calls_non_sort(self, mock_get_by_filters, mock_get_by_filters_sort):

    objects.InstanceList.get_by_filters(self.context, {'foo': 'bar'}, sort_key='key', sort_dir='dir', limit=100, marker='uuid', use_slave=True)
    mock_get_by_filters.assert_called_once_with(self.context, {'foo': 'bar'}, 'key', 'dir', limit=100, marker='uuid', columns_to_join=None)
    self.assertEqual(0, mock_get_by_filters_sort.call_count)
