~daisy-pluckers/oops-repository/trunk

« back to all changes in this revision

Viewing changes to oopsrepository/testing/cassandra.py

  • Committer: Robert Collins
  • Date: 2011-02-26 19:47:58 UTC
  • Revision ID: robert@canonical.com-20110226194758-u0i9ppdqcpsjifo6
Schema creation is possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
import pycassa
13
13
from pycassa.system_manager import SystemManager
14
14
 
 
15
from oopsrepository.cassandra import workaround_1779
 
16
 
15
17
 
16
18
class TemporaryKeyspace(Fixture):
17
19
    """Create a temporary keyspace.
24
26
        tempdir = self.useFixture(TempDir())
25
27
        self.keyspace = os.path.basename(tempdir.path)
26
28
        self.mgr = SystemManager()
27
 
        self.mgr.create_keyspace(self.keyspace, replication_factor=1)
28
 
        self.addCleanup(self.mgr.drop_keyspace, self.keyspace)
 
29
        workaround_1779(self.mgr.create_keyspace, self.keyspace,
 
30
            replication_factor=1)
 
31
        self.addCleanup(workaround_1779, self.mgr.drop_keyspace,
 
32
            self.keyspace)