Exemple #1
0
 def test_pad_set(self):
     with a.app.app_context():
         rs = a.get_redis()
         a.pad_set('foo', 'bar')
         a.pad_set('foobar', 'foobar')
         self.assertEqual(rs.get('pad:foo'), 'bar')
         self.assertEqual(rs.get('pad:foobar'), 'foobar')
Exemple #2
0
 def test_route_get(self):
     with a.app.app_context():
         a.pad_set('foo', '#foobar context#')
         rv = self.app.get('/foo')
         self.assertTrue('#foobar context#' in rv.data)