Пример #1
0
def test_account_activation_link_is_not_valid():
    # 4.1.3.3 Account activation - Invalid link & 4.1.3.2 Link verification
    account = Account('*****@*****.**')
    manager = AccountManager()

    account.activation_code = 'Test34'
    manager.add_account(account)

    assert manager.unlock_account(
        'invalidCode') == False, 'Account should not be unlocked'
Пример #2
0
def test_account_activation_link_is_valid():
    # 4.1.3.4 Account activation & 4.1.3.2 Link verification
    account = Account('*****@*****.**')
    manager = AccountManager()

    account.activation_code = 'Test123'
    manager.add_account(account)

    assert manager.unlock_account(
        account.activation_code) == True, 'Account should successfully be unlocked'