#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals

import unittest
import json

from me_api.app import create_app
from me_api.configs import TestingConfig


class MeAPITestCase(unittest.TestCase):
    def setUp(self):
        self.app = create_app(TestingConfig).test_client()

    def test_index(self):
        rv = self.app.get('/')
        assert 'me' in json.loads(rv.data).keys()
        assert 'routers' in json.loads(rv.data).keys()
        assert (len(TestingConfig.modules['modules'].keys()) ==
                len(json.loads(rv.data)['routers']))

@@ -415,32 +415,41 @@
 on.loads(rv.data
+.decode()
 ).keys()%0A       
@@ -487,16 +487,25 @@
 (rv.data
+.decode()
 ).keys()
@@ -607,16 +607,25 @@
 (rv.data
+.decode()
 )%5B'route

Update test_modules.py: for 2/3 compatible