# Path: tests_python/util_tests.py
# class TestApp(TestCase):
# 
#     def setUp(self):
#         config = {
#             'SECRET_KEY': 'testing',
#             'SRP_USER_AGENT_EMAIL': 'testing@example.com',
#             'WTF_CSRF_ENABLED': False,
#         }
#         # Default to an ephemeral SQLite DB for testing unless given another
#         # database to connect to.
#         config['SQLALCHEMY_DATABASE_URI'] = env.get('DB', 'sqlite:///')
#         self.app = create_app(config)
#         db.create_all(app=self.app)
# 
#     def tearDown(self):
#         db.drop_all(app=self.app)
# 
# def response(*args, **kwargs):
#     resp = httmock.response(*args, **kwargs)
#     if isinstance(resp._content, str):
#         resp._content = resp._content.encode('utf-8')
#     return resp


import json
from six.moves.urllib.parse import urlparse
from httmock import HTTMock, urlmatch
from .util_tests import TestApp, response
from evesrp import systems
            'id': 20000020,
            'id_str': '20000020' 
        },
        'id_str': '30000142',
        'id': 30000142 
    }
    return response(content=json.dumps(resp))


@urlmatch(scheme='https',
          netloc=r'(public-)?crest(-tq)?\.eveonline\.com',
          path=r'^/constellations/(999)?20000020/$')
def kimotoro_lookup(url, request):
    resp = {
        'name': 'Kimotoro',
        'region': {'href':
            'https://crest-tq.eveonline.com/regions/10000002/'},
    }
    return response(content=json.dumps(resp))


@urlmatch(scheme='https',
          netloc=r'(public-)?crest(-tq)?\.eveonline\.com',
          path=r'^/regions/(999)?10000002/$')
def forge_lookup(url, request):
    resp = {
        'name': 'The Forge',
        'id': 10000002,
        'id_str': '10000002',
    }

# Path: tests_python/util_tests.py
# class TestApp(TestCase):
# 
#     def setUp(self):
#         config = {
#             'SECRET_KEY': 'testing',
#             'SRP_USER_AGENT_EMAIL': 'testing@example.com',
#             'WTF_CSRF_ENABLED': False,
#         }
#         # Default to an ephemeral SQLite DB for testing unless given another
#         # database to connect to.
#         config['SQLALCHEMY_DATABASE_URI'] = env.get('DB', 'sqlite:///')
#         self.app = create_app(config)
#         db.create_all(app=self.app)
# 
#     def tearDown(self):
#         db.drop_all(app=self.app)
# 
# def response(*args, **kwargs):
#     resp = httmock.response(*args, **kwargs)
#     if isinstance(resp._content, str):
#         resp._content = resp._content.encode('utf-8')
#     return resp


# Path: tests_python/test_systems.py
import json
from six.moves.urllib.parse import urlparse
from httmock import HTTMock, urlmatch
from .util_tests import TestApp, response
from evesrp import systems

            'id': 20000020,
            'id_str': '20000020' 
        },
        'id_str': '30000142',
        'id': 30000142 
    }
    return response(content=json.dumps(resp))


@urlmatch(scheme='https',
          netloc=r'(public-)?crest(-tq)?\.eveonline\.com',
          path=r'^/constellations/(999)?20000020/$')
def kimotoro_lookup(url, request):
    resp = {
        'name': 'Kimotoro',
        'region': {'href':
            'https://crest-tq.eveonline.com/regions/10000002/'},
    }
    return response(content=json.dumps(resp))


@urlmatch(scheme='https',
          netloc=r'(public-)?crest(-tq)?\.eveonline\.com',
          path=r'^/regions/(999)?10000002/$')
def forge_lookup(url, request):
    resp = {
        'name': 'The Forge',
        'id': 10000002,
        'id_str': '10000002',
    }

    return response(content=json.dumps(resp))