def test_sku_locations(): state = InventoryStateMachine() state.delete_missing_sku(sku_id='SKU000000') 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.sku_locations(sku_id=v2) state.teardown()
def test_update_batch_missing_sku(): state = InventoryStateMachine() state.delete_missing_user(user_id='00') state.delete_missing_user(user_id=';') v1 = state.new_user(user={'id': '1', 'name': '', 'password': '******'}) state.delete_missing_sku(sku_id='SKU066304') state.delete_missing_sku(sku_id='SKU000256') v2 = state.new_anonymous_batch(batch=Batch(associated_codes=[], id='BAT000000', name='', owned_codes=[], props={'a': [None]}, sku_id=None)) state.attempt_update_anonymous_batch_missing_sku_id(batch_id=v2, patch={}, sku_id='SKU000000') state.teardown()