Skip to content

Commit 1f77a95

Browse files
committed
Fix tests for pypy.
Cryptography version 1.0 requires pypy >= 2.6.0. Pypy on Travis is ~2.5.0, so for now we downgrade cryptography on pypy.
1 parent 0a541ed commit 1f77a95

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/unit/object/test_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ def test_get_shared_link(
102102
expected_data['shared_link']['access'] = shared_link_access
103103
if shared_link_unshared_at is not None:
104104
expected_data['shared_link']['unshared_at'] = shared_link_unshared_at.isoformat()
105-
if shared_link_password is not None:
106-
expected_data['shared_link']['password'] = shared_link_password
107105
if shared_link_can_download is not None or shared_link_can_preview is not None:
108106
expected_data['shared_link']['permissions'] = permissions = {}
109107
if shared_link_can_download is not None:
110108
permissions['can_download'] = shared_link_can_download
111109
if shared_link_can_preview is not None:
112110
permissions['can_preview'] = shared_link_can_preview
111+
if shared_link_password is not None:
112+
expected_data['shared_link']['password'] = shared_link_password
113113
url = test_item.get_shared_link(
114114
etag=etag,
115115
access=shared_link_access,

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ commands =
2121
py.test test/ {posargs}
2222
deps = -rrequirements-dev.txt
2323

24+
[testenv:pypy]
25+
deps = -rrequirements-dev.txt
26+
commands =
27+
pip install cryptography==0.9.3 --upgrade
28+
py.test test/ {posargs}
29+
2430
[testenv:rst]
2531
deps =
2632
docutils

0 commit comments

Comments
 (0)