Created
February 19, 2011 08:37
-
-
Save nailor/834928 to your computer and use it in GitHub Desktop.
Test for issue #10 in Trombi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import trombi | |
from tornado.ioloop import IOLoop | |
ioloop = IOLoop.instance() | |
f = open('onemb.zero') | |
db = trombi.from_uri('http://localhost:5984/test') | |
def doc_created(doc): | |
assert not doc.error | |
doc.attach('1M', f.read(), attach_done) | |
def attach_done(doc): | |
assert not doc.error | |
ioloop.stop() | |
db.set({'test': 'doc'}, doc_created) | |
ioloop.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment