def test_card_retrieve(): card: Card = Card.retrieve(card_id) assert card.id == card_id assert len(card.number) == 16 assert card.last_4_digits == '9849' assert card.bin == '544875' assert card.type == CardType.virtual assert not card.pin_attempts_exceeded
def test_card_not_found(): with pytest.raises(CuencaResponseException) as exc: Card.retrieve('not-existing-id') assert exc.value.status_code == 404 assert exc.value.json['Code'] == 'NotFoundError'
def test_card_retrieve(): card: Card = Card.retrieve(card_id) assert card.id == card_id assert len(card.number) == 16 assert card.type == CardType.virtual