def test_set_orders(self): test_inst = ExchangePersonalData() # without orders test_inst.orders = {} assert not test_inst.has_order(10) assert not test_inst.has_order(20) test_inst.set_orders([{"id": 15}, {"id": 10}, {"id": 20}, {"id": 15}]) assert test_inst.get_order(15) assert test_inst.has_order(15) assert test_inst.has_order(20) assert test_inst.has_order(10) assert not test_inst.has_order(12) assert not test_inst.has_order(30)