def test_batch_if_not_exists(self):
        with mock.patch.object(self.session, 'execute') as m:
            with BatchQuery() as b:
                TestIfNotExistsModel.batch(b).if_not_exists().create(count=8)

        self.assertIn("IF NOT EXISTS", m.call_args[0][0].query_string)
ensure 'IF NOT EXISTS' exists in statement when in batch
dataset/ETHPy150Open datastax/python-driver/tests/integration/cqlengine/test_ifnotexists.py/IfNotExistsModelTest.test_batch_if_not_exists