# Path: compmusic/dunya/conn.py
# def _make_url(path, **kwargs):
#     if "://" in HOSTNAME:
#         protocol, hostname = HOSTNAME.split("://")
#     else:
#         protocol = "http"
#         hostname = HOSTNAME
# 
#     if not kwargs:
#         kwargs = {}
#     for key, value in kwargs.items():
#         if isinstance(value, str):
#             kwargs[key] = value.encode('utf8')
#     url = urllibparse.urlunparse((
#         protocol,
#         hostname,
#         '%s' % path,
#         '',
#         urllibparse.urlencode(kwargs),
#         ''
#     ))
#     return url


import unittest
from compmusic.dunya.conn import _make_url




class ConnTest(unittest.TestCase):
    def test_make_url(self):
        params = {"first": "%^grtà"}

# Path: compmusic/dunya/conn.py
# def _make_url(path, **kwargs):
#     if "://" in HOSTNAME:
#         protocol, hostname = HOSTNAME.split("://")
#     else:
#         protocol = "http"
#         hostname = HOSTNAME
# 
#     if not kwargs:
#         kwargs = {}
#     for key, value in kwargs.items():
#         if isinstance(value, str):
#             kwargs[key] = value.encode('utf8')
#     url = urllibparse.urlunparse((
#         protocol,
#         hostname,
#         '%s' % path,
#         '',
#         urllibparse.urlencode(kwargs),
#         ''
#     ))
#     return url


# Path: test/dunya/conn_test.py
import unittest
from compmusic.dunya.conn import _make_url





class ConnTest(unittest.TestCase):
    def test_make_url(self):
        params = {"first": "%^grtà"}

        url = _make_url("path", **params)