Exemple #1
0
def test_validate_q_short_bad_term():
    parser = QueryParser(q.q_short_bad_term)
    assert not parser.validate(
    ), '"q_short_bad_term" should be an INVALID query'
Exemple #2
0
def test_validate_q_short_bad_brackets():
    parser = QueryParser(q.q_short_bad_brackets)
    assert not parser.validate(
    ), '"q_short_bad_brackets" should be an INVALID query'
Exemple #3
0
def test_validate_q_long_vars_newlines():
    parser = QueryParser(q.q_long_vars_newlines)
    assert parser.validate(), f'"q_long_vars_newlines" should be a valid query'
Exemple #4
0
def test_validate_q_looong_query():
    parser = QueryParser(q.q_looong_query)
    assert parser.validate(), f'"q_looong_query" should be a valid query'
Exemple #5
0
def test_validate_q_short():
    parser = QueryParser(q.q_short)
    assert parser.validate(), f'"q_short" should be a valid query'
Exemple #6
0
def test_validate_q_long_alias_vars():
    parser = QueryParser(q.q_long_alias_vars)
    assert parser.validate(), f'"q_long_alias_vars" should be a valid query'
Exemple #7
0
def test_validate_q_short_attrs_comma():
    parser = QueryParser(q.q_short_attrs_comma)
    assert parser.validate(), f'"q_short_attrs_comma" should be a valid query'
Exemple #8
0
def test_validate_q_short_attrs_spaces():
    parser = QueryParser(q.q_short_attrs_spaces)
    assert parser.validate(), f'"q_short_attrs_spaces" should be a valid query'
Exemple #9
0
def test_validate_q_long_bad_no_vars():
    parser = QueryParser(q.q_long_bad_no_vars)
    assert not parser.validate(
    ), '"q_long_bad_no_vars" should be an INVALID query'