예제 #1
0
파일: app_tests.py 프로젝트: burkhart/Pad
 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')
예제 #2
0
파일: app_tests.py 프로젝트: burkhart/Pad
 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)