1
# oops-repository is Copyright 2011 Canonical Ltd.
3
# Canonical Ltd ("Canonical") distributes the oops-repository source code under
4
# the GNU Affero General Public License, version 3 ("AGPLv3"). See the file
5
# LICENSE in the source tree for more information.
9
from fixtures import EnvironmentVariableFixture
11
from testtools import TestCase
13
from oopsrepository import schema
14
from oopsrepository.testing.cassandra import TemporaryKeyspace
17
class TestCreateSchema(TestCase):
19
def test_creates_columnfamily(self):
20
keyspace = self.useFixture(TemporaryKeyspace()).keyspace
21
config = dict(keyspace=keyspace)
23
pool = pycassa.connect(keyspace)
24
cf = pycassa.ColumnFamily(pool, 'OOPS')
25
cf.insert('key', {"date":time.time(), "URL":'a bit boring'})