'test for materialized view metadata alteration
test_materialized_view_metadata_alter tests that materialized view metadata is properly updated implicitly in the
table metadata once that view is updated. It creates a simple base table and then creates a view based
on that table. It then alters that materalized view and checks that the materialized view metadata is altered in
the table metadata.
@since 3.0.0
@jira_ticket PYTHON-371
@expected_result Materialized view metadata should be updated with the view is altered.
@test_category metadata'

def test_materialized_view_metadata_alter(self):

    self.assertIn('SizeTieredCompactionStrategy', self.cluster.metadata.keyspaces[self.keyspace_name].tables[self.function_table_name].views['mv1'].options['compaction']['class'])
    self.session.execute("ALTER    MATERIALIZED    VIEW    {0}.mv1    WITH    compaction    =    {{    'class'    :    'LeveledCompactionStrategy'    }}".format(self.keyspace_name))
    self.assertIn('LeveledCompactionStrategy', self.cluster.metadata.keyspaces[self.keyspace_name].tables[self.function_table_name].views['mv1'].options['compaction']['class'])
