'Assert that two assets are equal, allowing for differences related to their being from different courses.'

def assertAssetEqual(self, expected_course_key, expected_asset, actual_course_key, actual_asset):

    for key in self.ignored_asset_keys:
        if (key in expected_asset):
            del expected_asset[key]
        if (key in actual_asset):
            del actual_asset[key]
    expected_key = expected_asset.pop('asset_key')
    actual_key = actual_asset.pop('asset_key')
    self.assertEqual(expected_key.map_into_course(actual_course_key), actual_key)
    self.assertEqual(expected_key, actual_key.map_into_course(expected_course_key))
    expected_filename = expected_asset.pop('filename')
    actual_filename = actual_asset.pop('filename')
    self.assertEqual(expected_key.to_deprecated_string(), expected_filename)
    self.assertEqual(actual_key.to_deprecated_string(), actual_filename)
    self.assertEqual(expected_asset, actual_asset)
