Skip to content

Commit

Permalink
Add one more strict_ordering tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhgg committed Oct 9, 2015
1 parent 92bff0f commit 418613d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/core_execution/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,16 @@ def test_fails_to_execute_a_query_containing_a_type_definition():
assert excinfo.value.message == 'GraphQL cannot execute a request containing a ObjectTypeDefinition.'


def test_executor_detects_strict_ordering():
executor = Executor()
assert not executor.enforce_strict_ordering
assert executor.map_type is dict

executor = Executor(map_type=OrderedDict)
assert executor.enforce_strict_ordering
assert executor.map_type is OrderedDict


def test_executor_can_enforce_strict_ordering():
Type = GraphQLObjectType('Type', lambda: {
'a': GraphQLField(GraphQLString,
Expand Down

0 comments on commit 418613d

Please sign in to comment.