コード例 #1
0
 def construct_datastore(self):
     return CassandraDatastore(
         settings=CassandraSettings(
             default_keyspace=DEFAULT_KEYSPACE_FOR_TESTING),
         tables=(IntegerSequencedRecord, TimestampSequencedRecord,
                 SnapshotRecord),
     )
コード例 #2
0
    def test_consistency_level_error(self):
        datastore = CassandraDatastore(
            settings=CassandraSettings(
                default_keyspace=DEFAULT_KEYSPACE_FOR_TESTING,
                consistency="invalid"),
            tables=(IntegerSequencedRecord, ),
        )

        with self.assertRaises(DatasourceSettingsError):
            datastore.setup_connection()
コード例 #3
0
 def test_plain_text_auth_provider(self):
     datastore = CassandraDatastore(
         settings=CassandraSettings(
             default_keyspace=DEFAULT_KEYSPACE_FOR_TESTING,
             username="******",
             password="******",
         ),
         tables=(IntegerSequencedRecord, ),
     )
     datastore.setup_connection()
コード例 #4
0
 def construct_datastore(self):
     return CassandraDatastore(settings=CassandraSettings(),
                               tables=(StoredEventRecord, ))
 def construct_datastore(self):
     return CassandraDatastore(
         settings=CassandraSettings(default_keyspace=DEFAULT_KEYSPACE_FOR_TESTING),
         tables=(CqlTimeuuidSequencedItem,),
     )