summaryrefslogtreecommitdiff
path: root/src/mango/test/14-json-pagination.py
diff options
context:
space:
mode:
authorTony Sun <tony.sun427@gmail.com>2017-09-25 17:54:45 -0700
committerTony Sun <tony.sun427@gmail.com>2017-09-25 17:54:45 -0700
commit39f6f6a27d7dd4ab59b5400a0d81f8ebbdd06ad0 (patch)
tree0e86962422930ddf8ba9e5cfd69b9980cc98358f /src/mango/test/14-json-pagination.py
parent00df0def7fb8107717ed2274b88f855d18402a72 (diff)
downloadcouchdb-make-mango-python3-compile.tar.gz
fix tests to be compatible for both python2 and python3make-mango-python3-compile
We change syntax issues that make the tests incompatible for python3 but also ensure that it still runs using python2.
Diffstat (limited to 'src/mango/test/14-json-pagination.py')
-rw-r--r--src/mango/test/14-json-pagination.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mango/test/14-json-pagination.py b/src/mango/test/14-json-pagination.py
index ddac15662..ea06e0a2a 100644
--- a/src/mango/test/14-json-pagination.py
+++ b/src/mango/test/14-json-pagination.py
@@ -159,7 +159,7 @@ class PaginateJsonDocs(mango.DbPerClass):
def test_bad_bookmark(self):
try:
self.db.find({"_id": {"$gt": 0}}, bookmark="bad-bookmark")
- except Exception, e:
+ except Exception as e:
resp = e.response.json()
assert resp["error"] == "invalid_bookmark"
assert resp["reason"] == "Invalid bookmark value: \"bad-bookmark\""
@@ -171,7 +171,7 @@ class PaginateJsonDocs(mango.DbPerClass):
bookmark = 'g2wAAAABaANkABFub2RlMUBjb3VjaGRiLm5ldGwAAAACYQBiP____2poAkY_8AAAAAAAAGEHag'
try:
self.db.find({"_id": {"$gt": 0}}, bookmark=bookmark)
- except Exception, e:
+ except Exception as e:
resp = e.response.json()
assert resp["error"] == "invalid_bookmark"
assert e.response.status_code == 400