'Test to validate that nested type serialization works on various protocol versions. Provided
the version of cassandra is greater the 2.1.3 we would expect to nested to types to work at all protocol versions.
@since 3.0.0
@jira_ticket PYTHON-215
@expected_result no exceptions are thrown
@test_category data_types serialization'

@greaterthancass21
@lessthancass30
def test_nested_types_with_protocol_version(self):

    ddl = 'CREATE    TABLE    {0}.t    (\n                                                                k    int    PRIMARY    KEY,\n                                                                v    list<frozen<set<int>>>)'.format(self.keyspace_name)
    self.session.execute(ddl)
    ddl = 'CREATE    TABLE    {0}.u    (\n                                                                k    int    PRIMARY    KEY,\n                                                                v    set<frozen<list<int>>>)'.format(self.keyspace_name)
    self.session.execute(ddl)
    ddl = 'CREATE    TABLE    {0}.v    (\n                                                                k    int    PRIMARY    KEY,\n                                                                v    map<frozen<set<int>>,    frozen<list<int>>>,\n                                                                v1    frozen<tuple<int,    text>>)'.format(self.keyspace_name)
    self.session.execute(ddl)
    self.session.execute('CREATE    TYPE    {0}.typ    (v0    frozen<map<int,    frozen<list<int>>>>,    v1    frozen<list<int>>)'.format(self.keyspace_name))
    ddl = 'CREATE    TABLE    {0}.w    (\n                                                                k    int    PRIMARY    KEY,\n                                                                v    frozen<typ>)'.format(self.keyspace_name)
    self.session.execute(ddl)
    for pvi in range(1, 5):
        self.run_inserts_at_version(pvi)
        for pvr in range(1, 5):
            self.read_inserts_at_level(pvr)
