Skip to content

Commit

Permalink
Select G not GQL
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAquilina committed Aug 11, 2017
1 parent 342767c commit 330a322
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test_flake8_graphql.py
Expand Up @@ -7,7 +7,7 @@ def test_no_query(flake8dir):
name = 'hello world'
name.split(' ')
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == []


Expand All @@ -18,7 +18,7 @@ def gql(query):
query = gql("query { countries { name } }")
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == []


Expand All @@ -30,7 +30,7 @@ def __init__(self, query):
query = gql("query { countries { name } }")
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == []


Expand All @@ -40,7 +40,7 @@ def test_GQL100_import_pass(flake8dir):
query = gql("query { countries { name } }")
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == []


Expand All @@ -51,7 +51,7 @@ def gql(query):
query = gql("queryd countries { name } }")
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == [
'./example.py:4:9: G100 Syntax Error GraphQL (1:1) Unexpected Name "queryd"',
]
Expand All @@ -65,7 +65,7 @@ def __init__(self, query):
query = gql("queryd countries { name } }")
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == [
'./example.py:5:9: G100 Syntax Error GraphQL (1:1) Unexpected Name "queryd"',
]
Expand All @@ -86,7 +86,7 @@ def my_function():
}
''')
""")
result = flake8dir.run_flake8(['--select=GQL'])
result = flake8dir.run_flake8(['--select=G'])
assert result.out_lines == [
'./example.py:4:12: G100 Syntax Error GraphQL (4:9) Expected {, found Name "foobars"',
]
Expand All @@ -107,7 +107,7 @@ def my_function():
}
''')
""")
result = flake8dir.run_flake8(['--select=GQL', '--gql-identifier=GQL'])
result = flake8dir.run_flake8(['--select=G', '--gql-identifier=GQL'])
assert result.out_lines == [
'./example.py:4:12: G100 Syntax Error GraphQL (4:9) Expected {, found Name "foobars"',
]

0 comments on commit 330a322

Please sign in to comment.