def can_create_instance(): arg = GraphQLArgument(GraphQLString, description='arg description') node = DirectiveDefinitionNode() locations = [DirectiveLocation.SCHEMA, DirectiveLocation.OBJECT] directive = GraphQLDirective( name='test', locations=[DirectiveLocation.SCHEMA, DirectiveLocation.OBJECT], args={'arg': arg}, description='test description', ast_node=node) assert directive.name == 'test' assert directive.locations == locations assert directive.args == {'arg': arg} assert directive.description == 'test description' assert directive.ast_node is node
def can_create_instance(): arg = GraphQLArgument(GraphQLString, description="arg description") node = DirectiveDefinitionNode() locations = [DirectiveLocation.SCHEMA, DirectiveLocation.OBJECT] directive = GraphQLDirective( name="test", locations=[DirectiveLocation.SCHEMA, DirectiveLocation.OBJECT], args={"arg": arg}, description="test description", ast_node=node, ) assert directive.name == "test" assert directive.locations == locations assert directive.args == {"arg": arg} assert directive.description == "test description" assert directive.ast_node is node