def test_get_lexer_not_found(self): assert get_lexer('xxx/yyy') is None
def test_get_lexer(self, mime, explicit_json, body, expected_lexer_name): lexer = get_lexer(mime, body=body, explicit_json=explicit_json) assert lexer is not None assert lexer.name == expected_lexer_name
def test_get_lexer(self, mime): lexer = get_lexer(mime) assert lexer is not None assert lexer.name == 'JSON'