'Tests that has_changes() returns true on ancestors when a child is changed'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_has_changes_ancestors(self, default_ms):

    locations = self.setup_has_changes(default_ms)
    for key in locations:
        self.assertFalse(self._has_changes(locations[key]))
    child = self.store.get_item(locations['child'])
    child.display_name = 'Changed    Display    Name'
    self.store.update_item(child, self.user_id)
    self.assertTrue(self._has_changes(locations['grandparent']))
    self.assertTrue(self._has_changes(locations['parent']))
    self.assertTrue(self._has_changes(locations['child']))
    self.assertFalse(self._has_changes(locations['parent_sibling']))
    self.assertFalse(self._has_changes(locations['child_sibling']))
    self.store.publish(locations['parent'], self.user_id)
    for key in locations:
        self.assertFalse(self._has_changes(locations[key]))
