Exemplo n.º 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()
Exemplo n.º 2
0
 def test_create_succeeeds(self):
     management.create_keyspace('test_keyspace')
     management.delete_keyspace('test_keyspace')
Exemplo n.º 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()
Exemplo n.º 5
0
 def test_create_succeeeds(self):
     management.create_keyspace('test_keyspace', strategy_class="SimpleStrategy", replication_factor=1)
     management.delete_keyspace('test_keyspace')
Exemplo n.º 6
0
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)

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