Skip to content

Commit

Permalink
test: (new) generate query string with no fields raises error
Browse files Browse the repository at this point in the history
  • Loading branch information
BeatsuDev committed Sep 10, 2024
1 parent 0fef8bb commit 6eb40a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_query_creator_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def test_generate_query_string():
}
assert generate_query_string(fields) == correct_string

def test_generate_query_string_with_no_fields_raises_error():
fields = {}
with pytest.raises(ValueError):
generate_query_string(fields)

def test_generate_function_query_string():
correct_string = """
getSomething(id: 1, number: 3.14, name: \"John\", isCool: true) {
Expand Down

0 comments on commit 6eb40a7

Please sign in to comment.