'Assert that the modulestore asset metdata for the ``expected_course_key`` and the ``actual_course_key``
are equivalent.'

def assertAssetsMetadataEqual(self, expected_modulestore, expected_course_key, actual_modulestore, actual_course_key):

    expected_course_assets = expected_modulestore.get_all_asset_metadata(expected_course_key, None, sort=('displayname', ModuleStoreEnum.SortOrder.descending))
    actual_course_assets = actual_modulestore.get_all_asset_metadata(actual_course_key, None, sort=('displayname', ModuleStoreEnum.SortOrder.descending))
    self.assertEquals(len(expected_course_assets), len(actual_course_assets))
    for (idx, __) in enumerate(expected_course_assets):
        for attr in AssetMetadata.ATTRS_ALLOWED_TO_UPDATE:
            if (attr in ('edited_on',)):
                continue
            self.assertEquals(getattr(expected_course_assets[idx], attr), getattr(actual_course_assets[idx], attr))
