Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import unittest
- from cache import Cache
- class TestCache(unittest.TestCase):
- def setUp(self):
- """Set up test fixtures, if any."""
- def tearDown(self):
- """Tear down test fixtures, if any."""
- def test_destroy(self):
- c = Cache('abc', 123)
- self.assertEqual(c.get('abc'), 123)
- c.destroy()
- self.assertEqual(c.get(), {})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement