예제 #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)