https://github.com/dimagi/fakecouch
Faster than real couch
https://github.com/dimagi/fakecouch
Last synced: 5 months ago
JSON representation
Faster than real couch
- Host: GitHub
- URL: https://github.com/dimagi/fakecouch
- Owner: dimagi
- Created: 2013-05-08T09:06:10.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2018-08-03T21:02:09.000Z (almost 8 years ago)
- Last Synced: 2025-11-27T15:20:49.449Z (7 months ago)
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fakecouch [](https://travis-ci.org/dimagi/fakecouch)
Fake implementation of CouchDBKit api for testing purposes.
## Usage
Monkey patch fack db into CouchDBKit
```python
db = fakecouch.FakeCouchDb(views={
'my/view': [
(
{'reduce': True, 'group': True, 'startkey': [], 'endkey': [{}]},
[
{'r': 'result1'},
{'r': 'result2'},
]
)
]
},
docs={
'123': { ... doc dict ... }
})
DocumentSchema._db = fakedb
DocumentBase._db = fakedb
```
See tests for further useage.