def test_selection(self): condition = eq('name', 'foo') selection = Columns('first', 'last') op = (Delete( self.column_family).columns(*selection.args).where(condition)) cql, args = op.statement() self.assertEquals(cql, self.get_query(condition, selection)) self.assertEquals(args, condition.values + selection.values)
def delete_from(column_family, keyspace=None): return Delete(column_family, keyspace)
def test_no_condition(self): op = Delete(self.column_family) self.assertRaises(ValidationError, op.statement)