# Path: mfr/version.py

# 
# Path: tests/utils.py
# class MockCoroutine(mock.Mock):
# class FakeProvider(BaseProvider):
# class HandlerTestCase(testing.AsyncHTTPTestCase):
#     async def __call__(self, *args, **kwargs):
#     def setUp(self):
#     def tearDown(self):
#     def get_app(self):
#     def get_new_ioloop(self):


import json
from http import HTTPStatus
from tornado import testing
from mfr.version import __version__
from tests import utils





class TestStatusHandler(utils.HandlerTestCase):
    @testing.gen_test
    def test_get_status(self):
        resp = yield self.http_client.fetch(self.get_url('/status'))

        data = json.loads(resp.body.decode('utf-8'))
        assert resp.code == HTTPStatus.OK
        assert data['status'] == 'up'

# Path: mfr/version.py

# 
# Path: tests/utils.py
# class MockCoroutine(mock.Mock):
# class FakeProvider(BaseProvider):
# class HandlerTestCase(testing.AsyncHTTPTestCase):
#     async def __call__(self, *args, **kwargs):
#     def setUp(self):
#     def tearDown(self):
#     def get_app(self):
#     def get_new_ioloop(self):


# Path: tests/server/handlers/test_status.py
import json
from http import HTTPStatus
from tornado import testing
from mfr.version import __version__
from tests import utils






class TestStatusHandler(utils.HandlerTestCase):
    @testing.gen_test
    def test_get_status(self):
        resp = yield self.http_client.fetch(self.get_url('/status'))

        data = json.loads(resp.body.decode('utf-8'))
        assert resp.code == HTTPStatus.OK
        assert data['status'] == 'up'

        assert data['version'] == __version__