コード例 #1
0
 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,
     )
コード例 #2
0
 def testFileAsset(self):
     asset = FileAsset(File(open(get_test_asset().get_path(), "rb")))
     self.assertAssetWorks(asset)
コード例 #3
0
 def testStaticAsset(self):
     self.assertAssetWorks(get_test_asset())