'Ensure per-statement fetch_sizes override the default fetch size.'

def test_fetch_size(self):

    statements_and_params = zip(cycle(['INSERT    INTO    test3rf.test    (k,    v)    VALUES    (%s,    0)']), [(i,) for i in range(100)])
    execute_concurrent(self.session, list(statements_and_params))
    prepared = self.session.prepare('SELECT    *    FROM    test3rf.test')
    self.session.default_fetch_size = 10
    result = self.session.execute(prepared, [])
    self.assertTrue(result.has_more_pages)
    self.session.default_fetch_size = 2000
    result = self.session.execute(prepared, [])
    self.assertFalse(result.has_more_pages)
    self.session.default_fetch_size = None
    result = self.session.execute(prepared, [])
    self.assertFalse(result.has_more_pages)
    self.session.default_fetch_size = 10
    prepared.fetch_size = 2000
    result = self.session.execute(prepared, [])
    self.assertFalse(result.has_more_pages)
    prepared.fetch_size = None
    result = self.session.execute(prepared, [])
    self.assertFalse(result.has_more_pages)
    prepared.fetch_size = 10
    result = self.session.execute(prepared, [])
    self.assertTrue(result.has_more_pages)
    prepared.fetch_size = 2000
    bound = prepared.bind([])
    result = self.session.execute(bound, [])
    self.assertFalse(result.has_more_pages)
    prepared.fetch_size = None
    bound = prepared.bind([])
    result = self.session.execute(bound, [])
    self.assertFalse(result.has_more_pages)
    prepared.fetch_size = 10
    bound = prepared.bind([])
    result = self.session.execute(bound, [])
    self.assertTrue(result.has_more_pages)
    bound.fetch_size = 2000
    result = self.session.execute(bound, [])
    self.assertFalse(result.has_more_pages)
    bound.fetch_size = None
    result = self.session.execute(bound, [])
    self.assertFalse(result.has_more_pages)
    bound.fetch_size = 10
    result = self.session.execute(bound, [])
    self.assertTrue(result.has_more_pages)
    s = SimpleStatement('SELECT    *    FROM    test3rf.test', fetch_size=None)
    result = self.session.execute(s, [])
    self.assertFalse(result.has_more_pages)
    s = SimpleStatement('SELECT    *    FROM    test3rf.test')
    result = self.session.execute(s, [])
    self.assertTrue(result.has_more_pages)
    s = SimpleStatement('SELECT    *    FROM    test3rf.test')
    s.fetch_size = None
    result = self.session.execute(s, [])
    self.assertFalse(result.has_more_pages)
