mirror of
https://github.com/httpie/cli.git
synced 2024-11-26 01:33:33 +01:00
Merge branch 'main-module-convention' of https://github.com/gandaro/httpie into gandaro-main-module-convention
Renamed httpie.httpie to httpie.__main__ so that one can invoke it via python -m httpie.
This commit is contained in:
commit
ca8779d879
2
setup.py
2
setup.py
@ -15,5 +15,5 @@ setup(name='httpie',version=httpie.__version__,
|
|||||||
author=httpie.__author__,
|
author=httpie.__author__,
|
||||||
license=httpie.__licence__,
|
license=httpie.__licence__,
|
||||||
packages=['httpie'],
|
packages=['httpie'],
|
||||||
entry_points={'console_scripts': ['http = httpie.httpie:main']},
|
entry_points={'console_scripts': ['http = httpie.__main__:main']},
|
||||||
install_requires=requirements)
|
install_requires=requirements)
|
||||||
|
5
tests.py
5
tests.py
@ -1,7 +1,6 @@
|
|||||||
from functools import partial
|
|
||||||
import unittest
|
import unittest
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from httpie import httpie
|
from httpie import __main__
|
||||||
|
|
||||||
|
|
||||||
TERMINAL_COLOR_END = '\x1b[39m'
|
TERMINAL_COLOR_END = '\x1b[39m'
|
||||||
@ -14,7 +13,7 @@ def http(*args, **kwargs):
|
|||||||
}
|
}
|
||||||
http_kwargs.update(kwargs)
|
http_kwargs.update(kwargs)
|
||||||
stdout = http_kwargs.setdefault('stdout', StringIO())
|
stdout = http_kwargs.setdefault('stdout', StringIO())
|
||||||
httpie.main(args=args, **http_kwargs)
|
__main__.main(args=args, **http_kwargs)
|
||||||
return stdout.getvalue()
|
return stdout.getvalue()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user