示例#1
0
    def clear_keyspace(self, force=False):
        assert force, 'clear_keyspace must be called with force'
        assert self.keyspace != settings.CASSANDRA_KEYSPACE, 'Cannot erase the keyspace in settings'

        management.delete_keyspace(self.keyspace)
        self.tear_down()
        return self.setup()
示例#2
0
 def test_create_succeeeds(self):
     management.create_keyspace('test_keyspace')
     management.delete_keyspace('test_keyspace')
示例#3
0
    def _destroy_test_db(self, test_database_name, verbosity=1, **kwargs):

        delete_keyspace(test_database_name)
 def tearDown(self):
     delete_keyspace(self.keyspace)
     get_cluster().shutdown()
示例#5
0
 def test_create_succeeeds(self):
     management.create_keyspace('test_keyspace', strategy_class="SimpleStrategy", replication_factor=1)
     management.delete_keyspace('test_keyspace')
示例#6
0
文件: reset.py 项目: AntXlab/miitus
import miitus.libs # init libs
from cqlengine.management import delete_keyspace
from miitus.srv.core import Core
from miitus import defs

if __name__ == '__main__':
    c = Core()
    delete_keyspace(defs.CQL_KEYSPACE_NAME)

示例#7
0
 def tearDownClass(cls):
     super(BaseCassEngTestCase, cls).tearDownClass()
     drop_table(TestIfNotExistsModel)
     delete_keyspace(TestIfNotExistsModel.__keyspace__)
示例#8
0
 def tearDown(self):
     delete_keyspace(KEYSPACE)
 def tearDown(self):
     delete_keyspace(self.app.config['CQLENGINE_DEFAULT_KEYSPACE'])
示例#10
0
 def tearDownClass(cls):
     super(BaseCassEngTestCase, cls).tearDownClass()
     drop_table(TestIfNotExistsModel)
     delete_keyspace(TestIfNotExistsModel.__keyspace__)