Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
CharAct3 committed Apr 24, 2019
1 parent eb41292 commit cd89efa
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion aiocassandra/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from aiocassandra.session import aiosession
from aiocassandra.cqlengine.models import AioModel
from aiocassandra.session import aiosession

__all__ = ['aiosession', 'AioModel']
16 changes: 8 additions & 8 deletions aiocassandra/cqlengine/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
"""
from warnings import warn

from cassandra.cqlengine.query import (DMLQuery, ModelQuerySet, check_applied,
SimpleStatement, conn, ValidationError,
EqualsOperator)
from cassandra.cqlengine import CQLEngineException
from cassandra.cqlengine import columns
from cassandra.cqlengine.statements import (UpdateStatement, DeleteStatement,
BaseCQLStatement, InsertStatement)
from cassandra.cqlengine import CQLEngineException, columns
from cassandra.cqlengine.query import (DMLQuery, EqualsOperator, ModelQuerySet,
SimpleStatement, ValidationError,
check_applied, conn)
from cassandra.cqlengine.statements import (BaseCQLStatement, DeleteStatement,
InsertStatement, UpdateStatement)


async def _execute_statement(model,
Expand Down Expand Up @@ -325,7 +324,8 @@ async def async_update(self, **values):
if col_op == 'remove' and isinstance(col, columns.Map):
if not isinstance(val, set):
raise ValidationError(
"Cannot apply update operation '{0}' on column '{1}' with value '{2}'. A set is required."
"Cannot apply update operation '{0}' on column '{1}' "
"with value '{2}'. A set is required."
.format(col_op, col_name, val))
val = {v: None for v in val}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import pytest
from cassandra.cluster import Cluster
from cassandra.cqlengine import management
from cassandra.cqlengine import connection as cqlengine_connection
from cassandra.cqlengine import management

from aiocassandra import aiosession

Expand Down
4 changes: 3 additions & 1 deletion tests/test_async_cqlengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ async def test_queryset_async_functions(cqlengine_management):
"""
cqlengine_management.sync_table(User)

# test: Model.objects.async_create(), Model.objects.async_all(), Model.objects.async_get()
# test: Model.objects.async_create()
# Model.objects.async_all()
# Model.objects.async_get()
username1 = 'test-username-1'
await User.objects.async_create(user_id=uuid.uuid4(), username=username1)
users = await User.objects.async_all()
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ deps =
flake8
isort
commands =
flake8 --show-source aiocassandra.py setup.py
isort --check-only aiocassandra.py setup.py
flake8 --show-source aiocassandra
isort --check-only -rc aiocassandra
flake8 --show-source tests
isort --check-only -rc tests --diff

Expand Down

0 comments on commit cd89efa

Please sign in to comment.