Exemplo n.º 1
0
def account1(bucket):
    account = Account("Testing Account",
                      "This is the test account",
                      bucket=bucket)
    uid = account.uid()
    assert (uid is not None)
    assert (account.balance() == 0)
    assert (account.liability() == 0)

    account.set_overdraft_limit(account1_overdraft_limit)
    assert (account.get_overdraft_limit() == account1_overdraft_limit)

    return account
Exemplo n.º 2
0
def account1(bucket):
    push_is_running_service()
    accounts = Accounts(user_guid=account1_user)
    account = Account(name="Testing Account",
                      description="This is the test account",
                      group_name=accounts.name(),
                      bucket=bucket)
    uid = account.uid()
    assert (uid is not None)
    assert (account.balance() == Balance())

    account.set_overdraft_limit(account1_overdraft_limit)
    assert (account.get_overdraft_limit() == account1_overdraft_limit)
    pop_is_running_service()

    return account
Exemplo n.º 3
0
def account2(bucket):
    if not have_freezetime:
        return None

    with freeze_time(start_time) as frozen_datetime:
        now = datetime.datetime.now()
        assert (frozen_datetime() == now)
        account = Account("Testing Account", "This is the test account")

        uid = account.uid()
        assert (uid is not None)
        assert (account.balance() == 0)
        assert (account.liability() == 0)

        account.set_overdraft_limit(account2_overdraft_limit)
        assert (account.get_overdraft_limit() == account2_overdraft_limit)

    return account
Exemplo n.º 4
0
def account1(bucket):
    if not have_freezetime:
        return None

    with freeze_time(start_time) as _frozen_datetime:
        now = get_datetime_now()
        assert (start_time == now)
        push_is_running_service()
        accounts = Accounts(user_guid=account1_user)
        account = Account(name="Testing Account",
                          description="This is the test account",
                          group_name=accounts.name())
        uid = account.uid()
        assert (uid is not None)
        assert (account.balance() == Balance())

        account.set_overdraft_limit(account1_overdraft_limit)
        assert (account.get_overdraft_limit() == account1_overdraft_limit)
        pop_is_running_service()

    return account