Skip to content

Commit

Permalink
Merge pull request #633 from darshanime/version_number_fix
Browse files Browse the repository at this point in the history
fix env version attribute
  • Loading branch information
jkbrzt committed Dec 13, 2017
2 parents 91a2897 + 6472ca5 commit 4c13895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion httpie/config.py
Expand Up @@ -104,7 +104,7 @@ def _migrate_implicit_content_type(self):
try:
implicit_content_type = self.pop('implicit_content_type')
except KeyError:
pass
self.save()
else:
if implicit_content_type == 'form':
self['default_options'].insert(0, '--form')
Expand Down
7 changes: 7 additions & 0 deletions tests/test_config.py
@@ -1,4 +1,6 @@
from httpie import __version__
from utils import TestEnvironment, http
from httpie.context import Environment


def test_default_options(httpbin):
Expand Down Expand Up @@ -31,3 +33,8 @@ def test_migrate_implicit_content_type():
config.load()
assert 'implicit_content_type' not in config
assert config['default_options'] == ['--form']


def test_current_version():
version = Environment().config['__meta__']['httpie']
assert version == __version__

0 comments on commit 4c13895

Please sign in to comment.