Reintroduce $ https command alias with https:// as default scheme

Close #608
This commit is contained in:
Jakub Roztocil
2019-08-29 13:08:02 +02:00
parent 8512a630f9
commit 8e04a24b90
9 changed files with 50 additions and 26 deletions

View File

@ -342,6 +342,10 @@ class TestSchemes:
with pytest.raises(InvalidSchema):
http('bah', '--default=scheme=foo+bar-BAZ.123')
def test_default_scheme(self, httpbin_secure):
def test_default_scheme_option(self, httpbin_secure):
url = '{0}:{1}'.format(httpbin_secure.host, httpbin_secure.port)
assert HTTP_OK in http(url, '--default-scheme=https')
def test_scheme_when_invoked_as_https(self, httpbin_secure):
url = '{0}:{1}'.format(httpbin_secure.host, httpbin_secure.port)
assert HTTP_OK in http(url, program_name='https')