'Ensure nested are appropriately handled.'

def test_can_insert_nested_tuples(self):

    if (self.cass_version < (2, 1, 0)):
        raise unittest.SkipTest('The    tuple    type    was    introduced    in    Cassandra    2.1')
    c = Cluster(protocol_version=PROTOCOL_VERSION)
    s = c.connect(self.keyspace_name)
    s.row_factory = dict_factory
    s.encoder.mapping[tuple] = s.encoder.cql_encode_tuple
    s.execute(('CREATE    TABLE    nested_tuples    (k    int    PRIMARY    KEY,    v_1    frozen<%s>,v_2    frozen<%s>,v_3    frozen<%s>,v_32    frozen<%s>)' % (self.nested_tuples_schema_helper(1), self.nested_tuples_schema_helper(2), self.nested_tuples_schema_helper(3), self.nested_tuples_schema_helper(32))))
    for i in (1, 2, 3, 32):
        created_tuple = self.nested_tuples_creator_helper(i)
        s.execute('INSERT    INTO    nested_tuples    (k,    v_%s)    VALUES    (%s,    %s)', (i, i, created_tuple))
        result = s.execute('SELECT    v_%s    FROM    nested_tuples    WHERE    k=%s', (i, i))[0]
        self.assertEqual(created_tuple, result[('v_%s' % i)])
    c.shutdown()
