diff --git a/httpie/httpie.py b/httpie/__main__.py similarity index 100% rename from httpie/httpie.py rename to httpie/__main__.py diff --git a/setup.py b/setup.py index e6cd692b..2b36c249 100644 --- a/setup.py +++ b/setup.py @@ -15,5 +15,5 @@ setup(name='httpie',version=httpie.__version__, author=httpie.__author__, license=httpie.__licence__, packages=['httpie'], - entry_points={'console_scripts': ['http = httpie.httpie:main']}, + entry_points={'console_scripts': ['http = httpie.__main__:main']}, install_requires=requirements) diff --git a/tests.py b/tests.py index 6e5aec6c..5d2d9b13 100644 --- a/tests.py +++ b/tests.py @@ -1,13 +1,12 @@ import unittest from StringIO import StringIO -from httpie import httpie +from httpie import __main__ def http(*args, **kwargs): stdout = StringIO() - httpie.main(args=args, stdout=stdout, - stdin_isatty=True, - stdout_isatty=False) + __main__.main(args=args, stdout=stdout, stdin_isatty=True, + stdout_isatty=False) return stdout.getvalue()