Skip to content

Commit

Permalink
Fix python3 tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Feb 23, 2017
1 parent 1b54fee commit bccdc65
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ python: 2.7
services: redis-server
env:
- TOX_ENV=py27
- TOX_ENV=py34
- TOX_ENV=kinto-master
- TOX_ENV=flake8
install:
- pip install tox
Expand All @@ -14,6 +12,7 @@ matrix:
- python: 3.5
env:
- TOX_ENV=py35
- TOX_ENV=kinto-master
after_success:
# Report coverage results to coveralls.io
- pip install coveralls
Expand Down
2 changes: 1 addition & 1 deletion kinto_redis/permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_accessible_objects(self, principals, bound_permissions=None, with_childr
for object_id, permission in bound_permissions:
pattern = 'permission:%s:%s' % (object_id, permission)
regexp = re.compile('^%s$' % pattern.replace('*', '[^/]+'))
if regexp.match(key):
if regexp.match(key.decode('utf-8')):
one_of = True
if not one_of:
# Ignore not matching ones.
Expand Down
1 change: 1 addition & 0 deletions kinto_redis/tests/test_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def push(*args, **kwargs):
yield
StrictRedis.lpush = old


UID = str(uuid.uuid4())


Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ deps =
commands = flake8 kinto_redis
deps =
flake8

[flake8]
max-line-length = 99

0 comments on commit bccdc65

Please sign in to comment.