Exemple #1
0
def inventory_list(request, soda=None):
    if soda:
        return Inventory.getInventoryForSoda(soda)
    return Inventory.getEntireInventory()
Exemple #2
0
 def testInventoryModelForSoda(self):
     response = Inventory.getInventoryForSoda("coke")
     self.assertEquals(len(response), 1)
     for r in response:
         for x in ['soda', 'quantity']:
             self.assertTrue(r.has_key(x))