def test_set(self):
    container = CacheContainer()
    with self.assertRaises(ValueError):
        container.set('my value')
    container = DummyCache()
    (value, expiration) = container.set('my value')
    self.assertEqual(value, 'my value')
    self.assertTrue((21000 < (expiration - time.time()) < 21600))
    self.assertEqual(container.get(), 'my value')
def test_set(self):
    container = CacheContainer()
    with self.assertRaises(ValueError):
        container.set('my value')
    container = DummyCache()
    (value, expiration) = container.set('my value')
    self.assertEqual(value, 'my value')
    self.assertTrue((21000 < (expiration - time.time()) < 21600))
    self.assertEqual(container.get(), 'my value')