

def test_static_columns(self):
    if (PROTOCOL_VERSION < 2):
        raise unittest.SkipTest('Native protocol 2+ required, currently using: {0}'.format(PROTOCOL_VERSION))

    class StaticModel(Model):
        id = columns.Integer(primary_key=True)
        c = columns.Integer(primary_key=True)
        name = columns.Text(static=True)
    drop_table(StaticModel)
    session = get_session()
    with mock.patch.object(session, 'execute', wraps=session.execute) as m:
        sync_table(StaticModel)
    self.assertGreater(m.call_count, 0)
    statement = statement.call_args[0][0].query_string
    self.assertIn('"name" text static', statement)
    sync_table(StaticModel)
    with mock.patch.object(session, 'execute', wraps=session.execute) as m2:
        sync_table(StaticModel)
    self.assertEqual(len(m2.call_args_list), 0)

dataset/ETHPy150Open datastax/python-driver/tests/integration/cqlengine/management/test_management.py StaticColumnTests.test_static_columns/VarMisuse@128/167 `m`->`statement`