示例#1
0
文件: yilpil.py 项目: 7flying/yil-pil
 def get(self):
     """ Gets the last updates of the requested resource. """
     args = self.reqparse.parse_args()
     if args['resource'] != None and len(args['resource']) > 0:
         # Get the last post updates
         if args['resource'] == 'posts':
             result = manager.get_last_post_updates()
             return jsonify(posts=result)
         else:
             abort(404)
     else:
         abort(400)
示例#2
0
文件: yilpil.py 项目: 7flying/yil-pil
 def get(self):
     """ Gets the last updates of the requested resource. """
     args = self.reqparse.parse_args()
     if args['resource'] != None and len(args['resource']) > 0:
         # Get the last post updates
         if args['resource'] == 'posts':
             result = manager.get_last_post_updates()
             return jsonify(posts=result)
         else:
             abort(404)
     else:
         abort(400)
示例#3
0
	def test_4_updates(self):
		self.assertEqual(len(manager.get_last_post_updates()), 0)
		manager.populate_test2()
		self.assertGreater(len(manager.get_last_post_updates()), 0)
示例#4
0
 def test_4_updates(self):
     self.assertEqual(len(manager.get_last_post_updates()), 0)
     manager.populate_test2()
     self.assertGreater(len(manager.get_last_post_updates()), 0)