def n1(head, req): from couch_named_python import start, send, get_row assert head == {"some header": True} assert req == {"test_req": True} start({"code": 100}) send("hello world") assert get_row() == {"row": "one"} assert get_row() == {"row": "two"} send("moo") send("baa") assert get_row() == None send("whatever") assert get_row() == None
def n3(head, req): from couch_named_python import send, get_row, log assert get_row() == {"row": "one"} log("blah") assert get_row() == {"row": "two"}
def n2(head, req): from couch_named_python import send, get_row send("test two") assert get_row() == None send("suffix")