示例#1
0
 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 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
示例#3
0
 def g(doc, req):
     from couch_named_python import start, send
     start({"code": 403})
     send("You can't be here\n")
     send("It's dangerous\n")
 def g(doc, req):
     from couch_named_python import start, send
     start({"code": 403})
     send("You can't be here\n")
     send("It's dangerous\n")