def test_login_delete_missing_bin(): state = InventoryStateMachine() v1 = state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.login_as(user_id=v1) state.logout() state.delete_missing_bin(bin_id='BIN000000') state.teardown()
def test_simple_login(): state = InventoryStateMachine() v1 = state.new_user(user={ "id": 'tparker', "name": "tyler parker", "password": "******" }) state.login_as(v1) state.whoami() 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()
def test_delete_user(): state = InventoryStateMachine() v1 = state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.login_as(user_id=v1) state.delete_existing_user(user_id=v1) state.teardown()
def test_login_empty_password(): state = InventoryStateMachine() v1 = state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.login_bad_password(password='', user_id=v1) state.teardown()
def test_change_password(): state = InventoryStateMachine() v1 = state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.update_existing_user(user_id=v1, user_patch={'password': '******'}) state.teardown()
def test_create_existing_user(data): state = InventoryStateMachine() v1 = state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.create_existing_user(user_id=v1, data=data) state.teardown()
def test_new_user(): state = InventoryStateMachine() state.new_user(user={'id': '0', 'name': '', 'password': '******'}) state.teardown()