'Make sure that \'size\' parameter works correctly.'

def test_size_multi(self):

    q = TermQuery('name', 'bill')
    resultset_single = self.conn.search(query=q, indices=self.index_name)
    self.assertEqual(resultset_single.total, 2)
    s = Search(query=q, size=1)
    resultset_multi = self.conn.search_multi([s], indices_list=[self.index_name])
    resultset_multi._do_search()
    num_curl_requests = self._compute_num_requests()
    self.assertTrue(resultset_multi.valid)
    self.assertEqual(len(resultset_multi[0].hits), 1)
    self.assertIn(resultset_multi[0][0], resultset_single)
    self.assertEqual(num_curl_requests, self._compute_num_requests())
    self.assertIn(resultset_multi[0][1], resultset_single)
    self.assertLess((num_curl_requests - 1), self._compute_num_requests())
