Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_basic_operation_query(mock_requests_send):
'[Requests] - Test if query with type sgqlc.operation.Operation() works'
configure_mock_requests_send(mock_requests_send, graphql_response_ok)
schema = Schema()
# MyType and Query may be declared if doctests were processed by nose
if 'MyType' in schema:
schema -= schema.MyType
if 'Query' in schema:
schema -= schema.Query
class MyType(Type):
__schema__ = schema
i = int
class Query(Type):
__schema__ = schema
my_type = MyType
def test_operation_query(mock_websocket):
'Test if query with type sgqlc.operation.Operation() or raw bytes works'
schema = Schema()
# MyType and Query may be declared if doctests were processed by nose
if 'MyType' in schema:
schema -= schema.MyType
if 'Query' in schema:
schema -= schema.Query
class MyType(Type):
__schema__ = schema
i = int
class Query(Type):
__schema__ = schema
my_type = MyType
def test_basic_operation_query(mock_urlopen):
'Test if query with type sgqlc.operation.Operation() works'
configure_mock_urlopen(mock_urlopen, graphql_response_ok)
schema = Schema()
# MyType and Query may be declared if doctests were processed by nose
if 'MyType' in schema:
schema -= schema.MyType
if 'Query' in schema:
schema -= schema.Query
class MyType(Type):
__schema__ = schema
i = int
class Query(Type):
__schema__ = schema
my_type = MyType
#
# Authors:
# Santiago Dueñas
#
"""
SortingHat client schema.
Automatically generated using sgqlc tools.
"""
import sgqlc.types
import sgqlc.types.datetime
sh_schema = sgqlc.types.Schema()
########################################################################
# Scalars and Enumerations
########################################################################
Boolean = sgqlc.types.Boolean
DateTime = sgqlc.types.datetime.DateTime
class GenericScalar(sgqlc.types.Scalar):
__schema__ = sh_schema
ID = sgqlc.types.ID