~sil/u1db/http-all-docs

« back to all changes in this revision

Viewing changes to u1db/tests/test_http_database.py

  • Committer: Tarmac
  • Author(s): Eric Casteleijn
  • Date: 2012-08-14 14:55:10 UTC
  • mfrom: (375.1.1 deprecate-simplejson)
  • Revision ID: tarmac-20120814145510-9q1yb1vt8oyrgpo9
Removed simplejson as a hard dependency. It will still be used if present.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Tests for HTTPDatabase"""
18
18
 
19
19
import inspect
20
 
import simplejson
 
20
try:
 
21
    import simplejson as json
 
22
except ImportError:
 
23
    import json  # noqa
21
24
 
22
25
from u1db import (
23
26
    errors,
127
130
 
128
131
    def test_get_doc_deleted_include_deleted(self):
129
132
        self.response_val = errors.HTTPError(404,
130
 
                                             simplejson.dumps(
 
133
                                             json.dumps(
131
134
                                             {"error": errors.DOCUMENT_DELETED}
132
135
                                             ),
133
136
                                             {'x-u1db-rev': 'doc-rev-gone',