You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Fix time elapsed (#1277)
* Show the actual time elapsed; add docs * `requests.Response._headers_parsed_at` → `requests.Response._httpie_headers_parsed_at` * Add `ELAPSED_TIME_LABEL` constant * Tweak docs * Tweak docs * Allow multiple blank lines in Markdown files * Add rudimentary tests for --meta with different --style’s * Cleanup tests * Cleanup tests * Cleanup tests
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Here we test our output parsing and matching implementation, not HTTPie itself.
|
||||
|
||||
"""
|
||||
from httpie.models import ELAPSED_TIME_LABEL
|
||||
from httpie.output.writer import MESSAGE_SEPARATOR
|
||||
from ...utils import CRLF
|
||||
from . import assert_output_does_not_match, assert_output_matches, Expect
|
||||
@@ -111,7 +112,7 @@ def test_assert_output_matches_response_meta():
|
||||
assert_output_matches(
|
||||
(
|
||||
'Key: Value\n'
|
||||
'Elapsed Time: 3.3s'
|
||||
f'{ELAPSED_TIME_LABEL}: 3.3s'
|
||||
),
|
||||
[Expect.RESPONSE_META]
|
||||
)
|
||||
@@ -124,7 +125,7 @@ def test_assert_output_matches_whole_response():
|
||||
f'AAA:BBB{CRLF}'
|
||||
f'{CRLF}'
|
||||
f'CCC{MESSAGE_SEPARATOR}'
|
||||
'Elapsed Time: 3.3s'
|
||||
f'{ELAPSED_TIME_LABEL}: 3.3s'
|
||||
),
|
||||
[Expect.RESPONSE_HEADERS, Expect.BODY, Expect.RESPONSE_META]
|
||||
)
|
||||
|
Reference in New Issue
Block a user