Exemple #1
0
 def test_endow(self):
     """
     See capital.trade_utils for description of what a
     `trader` and `goods` must look like.
     """
     endow(self.trader, self.goods)
     self.assertFalse(is_depleted(self.trader["goods"]))
Exemple #2
0
 def test_random_generate_resources(self):
     td.allocate_resources(self.trader, self.goods)
     self.assertFalse(tu.is_depleted(self.trader["goods"]))
Exemple #3
0
 def test_is_depleted(self):
     goodA = {AMT_AVAIL: 0}
     goodB = {AMT_AVAIL: 0}
     goods_dict_zeros = {"a": goodA, "b": goodB}
     self.assertTrue(is_depleted(self.goods_dict_empty))
     self.assertTrue(is_depleted(goods_dict_zeros))