'Asserts that we have the expected number of courses, commits, and
rollbacks after we dump the modulestore to neo4j
Arguments:
mock_graph: a MockGraph backend
number_of_courses: number of courses we expect to find
number_commits: number of commits we expect against the graph
number_rollbacks: number of commit rollbacks we expect'

def assertCourseDump(self, mock_graph, number_of_courses, number_commits, number_rollbacks):

    courses = set([node[u'course_key'] for node in mock_graph.nodes])
    self.assertEqual(len(courses), number_of_courses)
    self.assertEqual(mock_graph.number_commits, number_commits)
    self.assertEqual(mock_graph.number_rollbacks, number_rollbacks)
