예제 #1
0
 def test_get_lexer_not_found(self):
     assert get_lexer('xxx/yyy') is None
예제 #2
0
 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
예제 #3
0
 def test_get_lexer(self, mime):
     lexer = get_lexer(mime)
     assert lexer is not None
     assert lexer.name == 'JSON'
예제 #4
0
 def test_get_lexer_not_found(self):
     assert get_lexer('xxx/yyy') is None
예제 #5
0
 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