mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 17:23:25 +01:00
Cleanup
This commit is contained in:
parent
14763e619d
commit
76ab8b84be
@ -1,3 +1,4 @@
|
||||
# https://travis-ci.org/jkbr/httpie
|
||||
language: python
|
||||
python:
|
||||
- 2.6
|
||||
|
@ -1,7 +1,11 @@
|
||||
import pytest
|
||||
|
||||
from httpie import ExitStatus
|
||||
from httpie.output.processors.colors import get_lexer
|
||||
from tests import TestEnvironment, http, httpbin, HTTP_OK, COLOR, CRLF
|
||||
|
||||
|
||||
|
||||
class TestVerboseFlag:
|
||||
def test_verbose(self):
|
||||
r = http('--verbose', 'GET', httpbin('/get'), 'test-header:__test__')
|
||||
@ -22,6 +26,23 @@ class TestVerboseFlag:
|
||||
assert r'\"baz\": \"bar\"' in r # response
|
||||
|
||||
|
||||
class TestColors:
|
||||
|
||||
@pytest.mark.parametrize('mime', [
|
||||
'text/html',
|
||||
'foo/html',
|
||||
'text/html+foo',
|
||||
'text/foo+html'
|
||||
])
|
||||
def test_get_lexer(self, mime):
|
||||
lexer = get_lexer(mime)
|
||||
assert lexer is not None
|
||||
assert lexer.name == 'HTML'
|
||||
|
||||
def test_get_lexer_not_found(self):
|
||||
assert get_lexer('xxx/yyy') is None
|
||||
|
||||
|
||||
class TestPrettyOptions:
|
||||
"""Test the --pretty flag handling."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user