コード例 #1
0
def test_card_create():
    card = Card.create(ledger_account_id, user_id)
    assert card.id
    assert len(card.number) == 16
    assert card.type == CardType.virtual
    assert card.user_id == user_id
    assert card.ledger_account_id == ledger_account_id
コード例 #2
0
def test_can_not_assign_new_virtual_card():
    with pytest.raises(CuencaResponseException) as exc:
        Card.create(CardIssuer.cuenca, CardFundingType.credit, user_id)
    assert exc.value
コード例 #3
0
def test_card_create():
    card = Card.create(CardIssuer.cuenca, CardFundingType.credit, user_id)
    assert card.id
    assert len(card.number) == 16
    assert card.type == CardType.virtual
    assert card.user_id == user_id
コード例 #4
0
def test_can_not_assign_new_virtual_card():
    with pytest.raises(CuencaResponseException) as exc:
        Card.create(ledger_account_id, user_id)
    assert exc.value