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 json | |
from tornado.httpclient import AsyncHTTPClient | |
class JiraClient(object): | |
def __init__(self, jira_server, jira_user, jira_password): | |
self.__jira_server = jira_server | |
self.__jira_user = jira_user | |
self.__jira_password = jira_password |
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
def test_root_output(client): | |
resp = client.fetch('/') | |
assert resp.code == 200 | |
assert resp.body == 'Hello, world' | |
def test_async_output(client): | |
resp = client.fetch('/async') | |
assert resp.code == 200 |
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 os | |
from uuid import uuid4 | |
from tornado import web | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.iostream import PipeIOStream | |
IOLoop.configure('tornado.platform.asyncio.AsyncIOMainLoop') |