def METHOD_NAME(self):
    """Tests that the reset order is correct, i.e., that the reading ops are
    reset before the writing ops (otherwise we write while a read-lock is
    held)."""
    # clear the db
    self.env.flush()
    g = Graph(self.env.getConnection(), GRAPH_ID)
    # create data
    g.query(
        """
        WITH 1 AS x
        CREATE (:X {uid: toString(x)})-[:R]->(y:Y {v: x})
        """
    )
    # create an index
    create_node_exact_match_index(g, 'X', 'uid', sync=True)
    create_node_exact_match_index(g, 'Y', 'v', sync=True)
    # utilize the index for a scan, followed by a deletion of the indexed
    # entity and setting of a property on the other entity
    res = g.query(
        """
        MATCH (x:X {uid: '1'})-[:R]->(y:Y)
        DELETE y
        SET x.uid = '10'
        RETURN x
        """
    )
    # validate results
    self.env.assertEquals(res.nodes_deleted, 1)
    self.env.assertEquals(res.relationships_deleted, 1)
    self.env.assertEquals(len(res.result_set), 1)
    self.env.assertEquals(res.result_set[0][0],
        Node(label='X', properties={'uid': '10'}))