Exemplo n.º 1
0
    def test_add_item(self):
        with self.config:
            oi = orders.create_new_order(2)
	orders.add_item(oi, 1, 1)
        ret = db.select('OrderedItems', where='order_id='+str(oi))
        ti = ret[0]
        self.assertEquals(ti.item_id, 1)
Exemplo n.º 2
0
 def test_create_order(self):
     with self.config:
         oi = orders.create_new_order(6)
     ret = db.select('Orders', where='id='+str(oi))
     to = ret[0]
     self.assertEquals(to.waiter, 6)
     self.assertEquals(to.status, 0)