def assertValidAsset(self, asset):

        self.assert_(isinstance(asset, typepad.Asset),
            'object %r is not a typepad.Asset' % asset)
        self.assert_(asset.author)
        self.assertValidUser(asset.author)
        # asset.content is not required for some asset types
        # self.assert_(asset.content)
        self.assert_(asset.text_format)
        self.assert_(asset.text_format in ('text', 'html'))
        # FIXME: https://intranet.sixapart.com/bugs/default.asp?88008
        # self.assert_(len(asset.groups) > 0)
        self.assert_(asset.id)
        self.assert_(asset.url_id)
        self.assert_(len(asset.object_types) > 0)
        self.assert_(asset.object_type)
        self.assert_(asset.published)

        self.assert_(asset.make_self_link())
        self.assert_(asset.favorite_count is not None)
        self.assert_(asset.comment_count is not None)
        # TODO: alternate was optional before, so maybe permalink_url might be None sometimes?
        self.assert_(asset.permalink_url is not None)

        object_type = asset.object_type
        self.assertValidAssetRef(asset.asset_ref)
        if object_type == 'Link':
            # additional properties we expect for link assets
            self.assert_(asset.target_url is not None)
        elif object_type == 'Photo':
            # additional properties we expect for photo assets
            self.assert_(asset.image_link is not None)
            self.assert_(asset.image_link.url_template is not None)
            self.assert_(asset.image_link.width is not None)
            self.assert_(asset.image_link.height is not None)
        elif object_type == 'Audio':
            self.assert_(asset.audio_link is not None)
            self.assert_(asset.audio_link.url is not None)
        elif object_type == 'Post':
            pass
        elif object_type == 'Comment':
            # FIXME: we have a data problem for one of our comments; parent object was deleted but the comment remained
            if len(asset.groups) > 0:
                self.assert_(asset.in_reply_to)
                self.assertValidAssetRef(asset.in_reply_to)
        elif object_type == 'Video':
            self.assert_(asset.video_link is not None)
            self.assert_(asset.video_link.embed_code is not None)

            preview = asset.preview_image_link
            if preview is not None:
                self.assert_(preview.url_template is not None)
                self.assert_(preview.width is not None)
                self.assert_(preview.height is not None)
        else:
            self.fail('asset has an unexpected objectType: %s' % \
                object_type)
        if asset.source:
            self.assert_(asset.source.permalink_url)
            self.assert_(asset.source.provider)

            self.assert_(asset.source.provider['icon'])
            self.assert_(asset.source.provider['name'])
            self.assert_(asset.source.provider['uri'])
Checks given asset for properties that should be present on all assets.
dataset/ETHPy150Open typepad/python-typepad-api/tests/test_typepad.py/TestGroup.assertValidAsset