]> git.scottworley.com Git - paperdoorknob/blobdiff - images_test.py
Learning TeX: Do Layouts with TeX macros
[paperdoorknob] / images_test.py
index 8ada1eec9bdd51991f6a99f4ac1f4a17fcecdf03..3f3fd13b3e7c2329321f1885cc1bfb07f08308c4 100644 (file)
@@ -8,7 +8,7 @@
 import unittest
 
 from fetch import FakeFetcher
 import unittest
 
 from fetch import FakeFetcher
-from images import ImageStore
+from images import DiskImageStore
 
 
 class TestImageStore(unittest.TestCase):
 
 
 class TestImageStore(unittest.TestCase):
@@ -22,7 +22,7 @@ class TestImageStore(unittest.TestCase):
             'https://example.com/other_images/carol': b'CAROLINA'})
 
     def testFetchOnce(self) -> None:
             'https://example.com/other_images/carol': b'CAROLINA'})
 
     def testFetchOnce(self) -> None:
-        store = ImageStore('istest_fetch_once', self._fetcher)
+        store = DiskImageStore('istest_fetch_once', self._fetcher)
         self.assertEqual(self._fetcher.request_count(), 0)
         a1 = store.get_image('https://example.com/images/alice.png')
         self.assertEqual(self._fetcher.request_count(), 1)
         self.assertEqual(self._fetcher.request_count(), 0)
         a1 = store.get_image('https://example.com/images/alice.png')
         self.assertEqual(self._fetcher.request_count(), 1)
@@ -48,7 +48,7 @@ class TestImageStore(unittest.TestCase):
         self.assertEqual(a1, a3)
 
     def testNameCollision(self) -> None:
         self.assertEqual(a1, a3)
 
     def testNameCollision(self) -> None:
-        store = ImageStore('istest_name_collision', self._fetcher)
+        store = DiskImageStore('istest_name_collision', self._fetcher)
         self.assertEqual(self._fetcher.request_count(), 0)
         b1 = store.get_image('https://example.com/images/bob.jpeg')
         self.assertEqual(self._fetcher.request_count(), 1)
         self.assertEqual(self._fetcher.request_count(), 0)
         b1 = store.get_image('https://example.com/images/bob.jpeg')
         self.assertEqual(self._fetcher.request_count(), 1)