def test_query(self, schema): query = schema.query[_.license(key='MIT')] assert query == quiz.Query(cls=schema.Query, selections=quiz.SelectionSet( quiz.Field('license', {'key': 'MIT'}), )) with pytest.raises(quiz.SelectionError): schema.query[_.foo]
def test_query(self, schema): query = schema.query[_.license(key="MIT")] assert query == quiz.Query( cls=schema.Query, selections=quiz.SelectionSet(quiz.Field("license", {"key": "MIT"})), ) with pytest.raises(quiz.SelectionError): schema.query[_.foo]