<filename>src/tests/mutations/test_mutation.py
import unittest
from graphene.test import Client
from src.mutations.schema import schema


class TestMutation(unittest.TestCase):
    def test_create_person(self):
        client = Client(schema)
        executed = client.execute('''
            mutation {
                createPerson(name: "slideshowp2") {
                    ok
                    person {
                        name
                        age
                    }
                }
            }
        ''')
        self.assertDictEqual(executed, {
            'data': {
                'createPerson': {
                    'ok': True,
                    'person': {
                        'name': 'slideshowp2',
                        'age': None
                    }
                }
            }
        })


if __name__ == '__main__':
    unittest.main()

<filename>src/tests/mutations/test_mutation.py
import unittest
from graphene.test import Client
from src.mutations.schema import schema


class TestMutation(unittest.TestCase):
    def test_create_person(self):
        client = Client(schema)
        executed = client.execute('''
            mutation {
                createPerson(name: "slideshowp2") {
                    ok
                    person {
                        name
                        age
                    }
                }
            }
        ''')
        self.assertDictEqual(executed, {
            'data': {
                'createPerson': {
                    'ok': True,
                    'person': {
                        'name': 'slideshowp2',
                        'age': None
                    }
                }
            }
        })


if __name__ == '__main__':
    unittest.main()

mutation {                 createPerson(name: "slideshowp2") {                     ok                     person {                         name                         age                     }                 }             }