Esempio n. 1
0
  def testInsertAndDeleteRestaurant(self):
    restaurant_uid = 'FuLinMen'
    restaurant_logic.add(restaurant_uid, 'restaurant', self.image_key)
    restaurants = restaurant_logic.get_all()
    self.assertEqual(1, len(restaurants))

    restaurant_logic.delete(restaurant_uid)
    restaurants = restaurant_logic.get_all()
    self.assertEqual(0, len(restaurants))
Esempio n. 2
0
File: pages.py Progetto: niczy/hyo
 def get(self):
   restaurants = restaurant_logic.get_all()
   self.render('index.html', {
     "restaurants": json_encoder.encode(restaurants)
     })