def test_move_sku(data): state = InventoryStateMachine() v1 = state.new_bin(bin=Bin(contents={}, id='BIN000000', props=None)) v2 = state.new_bin(bin=Bin(contents={}, id='BIN000001', props=None)) v3 = state.new_sku(sku=Sku(id='SKU000000')) state.receive_sku(bin_id=v1, sku_id=v3, quantity=1) state.move(data=data, destination_binId=v2, source_binId=v1) state.get_existing_bin(bin_id=v1) state.get_existing_bin(bin_id=v2) state.teardown()
def test_delete_used_sku(): state = InventoryStateMachine() v1 = state.new_bin(bin=Bin(contents={}, id='BIN000000', props=None)) v2 = state.new_sku(sku=Sku(associated_codes=[], id='SKU000000', name='', owned_codes=[], props=None)) state.receive_sku(bin_id=v1, quantity=1, sku_id=v2) state.attempt_delete_used_sku(sku_id=v2) state.teardown()