Example #1
0
 def test_get_latest_boragles(self):
     koi_boragle = self.make_boragle()
     koi_boragle.put()
     Boragle(name = "Koi2", desc= "Boragle about koi fish2", slugs = ["koi2"], creator = self.creator).put()
     Boragle(name = "Koi3", desc= "Boragle about koi fish3", slugs = ["koi3"], creator = self.creator).put()
     boragles = Boragle.get_latest(count = 2)
     self.assertEqual(2,len(boragles))
     self.assertEqual(boragles[0].slug,"koi3")
     self.assertEqual(boragles[1].slug,"koi2")
Example #2
0
 def get(self):
     self.render_template('main', dict(boragles = Boragle.get_latest(count = 5),
                             authdetails = utils.authdetails(),
                             creator = self.creator))