'Tests that has_changes() returns false after a child is published only if all children are unchanged'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_has_changes_publish_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_sibling = self.store.get_item(locations['child_sibling'])
    child.display_name = 'Changed    Display    Name'
    child_sibling.display_name = 'Changed    Display    Name'
    self.store.update_item(child, user_id=self.user_id)
    self.store.update_item(child_sibling, user_id=self.user_id)
    self.assertTrue(self._has_changes(locations['grandparent']))
    self.assertTrue(self._has_changes(locations['parent']))
    self.store.publish(locations['child_sibling'], self.user_id)
    self.assertTrue(self._has_changes(locations['grandparent']))
    self.assertTrue(self._has_changes(locations['parent']))
    self.store.publish(locations['child'], self.user_id)
    self.assertFalse(self._has_changes(locations['grandparent']))
    self.assertFalse(self._has_changes(locations['parent']))
