Esempio n. 1
0
def test_should_generate_boleto():
    nubank_client = Nubank(client=MockHttpClient())
    nubank_client.authenticate_with_qr_code('12345678912', 'hunter12',
                                            'some-uuid')

    assert nubank_client.create_boleto(
        200.50) == '123131321231231.2313212312.2131231.21332123'
Esempio n. 2
0
def test_should_generate_boleto(monkeypatch, create_boleto_return):
    monkeypatch.setattr(Discovery, '_update_proxy_urls', fake_update_proxy)
    monkeypatch.setattr(HttpClient, 'post', MagicMock(return_value=create_boleto_return))
    client = Nubank()

    boleto = client.create_boleto(200.50)

    assert boleto == create_boleto_return['data']['createTransferInBoleto']['boleto']['readableBarcode']