Exemple #1
0
def test_objects_mutation(patch, tree):
    """
    Ensures that mutations objects are compiled correctly.
    """
    patch.object(Objects, 'entity')
    patch.object(Objects, 'mutation_fragment')
    expected = {
        'method': 'mutation',
        'name': [Objects.entity(tree.entity)],
        'args': [Objects.mutation_fragment(tree.mutation_fragment)]
    }
    assert Objects().mutation(tree) == expected
Exemple #2
0
def test_objects_mutation(patch, tree):
    """
    Ensures that mutations objects are compiled correctly.
    """
    patch.object(Objects, "entity")
    patch.object(Objects, "mutation_fragment")
    expected = {
        "method": "mutation",
        "name": [Objects.entity(tree.entity)],
        "args": [Objects.mutation_fragment(tree.mutation_fragment)],
    }
    assert Objects().mutation(tree) == expected