Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 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)
Exemplo n.º 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)