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

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