mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 09:13:25 +01:00
Merge pull request #633 from darshanime/version_number_fix
fix env version attribute
This commit is contained in:
commit
4c138959ea
@ -104,7 +104,7 @@ class Config(BaseConfigDict):
|
|||||||
try:
|
try:
|
||||||
implicit_content_type = self.pop('implicit_content_type')
|
implicit_content_type = self.pop('implicit_content_type')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
self.save()
|
||||||
else:
|
else:
|
||||||
if implicit_content_type == 'form':
|
if implicit_content_type == 'form':
|
||||||
self['default_options'].insert(0, '--form')
|
self['default_options'].insert(0, '--form')
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
from httpie import __version__
|
||||||
from utils import TestEnvironment, http
|
from utils import TestEnvironment, http
|
||||||
|
from httpie.context import Environment
|
||||||
|
|
||||||
|
|
||||||
def test_default_options(httpbin):
|
def test_default_options(httpbin):
|
||||||
@ -31,3 +33,8 @@ def test_migrate_implicit_content_type():
|
|||||||
config.load()
|
config.load()
|
||||||
assert 'implicit_content_type' not in config
|
assert 'implicit_content_type' not in config
|
||||||
assert config['default_options'] == ['--form']
|
assert config['default_options'] == ['--form']
|
||||||
|
|
||||||
|
|
||||||
|
def test_current_version():
|
||||||
|
version = Environment().config['__meta__']['httpie']
|
||||||
|
assert version == __version__
|
||||||
|
Loading…
Reference in New Issue
Block a user