'Replaces the py2neo Graph object with a MockGraph; similarly replaces
NodeSelector with MockNodeSelector.
Arguments:
mock_selector_class: a mocked NodeSelector class
mock_graph_class: a mocked Graph class
transaction_errors: a bool for whether we should get errors
when transactions try to commit
Returns: an instance of MockGraph'

@staticmethod
def setup_mock_graph(mock_selector_class, mock_graph_class, transaction_errors=False):

    mock_graph = MockGraph(transaction_errors=transaction_errors)
    mock_graph_class.return_value = mock_graph
    mock_node_selector = MockNodeSelector(mock_graph)
    mock_selector_class.return_value = mock_node_selector
    return mock_graph
