Beispiel #1
0
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()
Beispiel #2
0
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()
Beispiel #3
0
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()
Beispiel #4
0
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()
Beispiel #5
0
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()
Beispiel #6
0
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()
Beispiel #7
0
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()
Beispiel #8
0
def test_new_user():
    state = InventoryStateMachine()
    state.new_user(user={'id': '0', 'name': '', 'password': '******'})
    state.teardown()