import requests


def http_test_client(application_settings):
    """ Returns an HTTP client that can send requests to local server."""
    class HTTPClient():
        def post(self, path, data=None):
            return requests.post(
                'http://localhost:%s%s' % (application_settings['APP_PORT'], path),
                json=data
            )

        def get(self, path):
            return requests.get('http://localhost:%s%s' % (application_settings['APP_PORT'], path))

    return HTTPClient()