def testGetAssetTag(self):
     asset = get_test_asset()
     url = default_asset_cache.get_url(asset)
     self.assertEqual(
         Template("{% load assets %}{% get_asset asset as asset_url %}{{asset_url}}").render(Context({
             "asset": asset,
         })),
         url,
     )
 def testFileAsset(self):
     asset = get_test_asset()
     file = open(asset.get_path(), "rb")
     asset = FileAsset(File(open(asset.get_path(), "rb")))
     self.assertAssetWorks(asset, file)
 def testStaticAsset(self):
     asset = get_test_asset()
     self.assertAssetWorks(asset, staticfiles_storage.open(asset.get_name()))