Skip to content

Commit

Permalink
corrige testes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigondec committed Aug 14, 2024
1 parent 2a08b5a commit 9b9d984
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
6 changes: 2 additions & 4 deletions examples/pix_cob/consultar_cobranca.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

from bb_wrapper.wrapper import PIXCobBBWrapper

c = PIXCobBBWrapper(
cert=("./certs/cert.pem", "./certs/key.pem")
)
c = PIXCobBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem"))

txid = '6lEZLwT4o1fjmg1BVW3KeIPLc0'
txid = "6lEZLwT4o1fjmg1BVW3KeIPLc0"

response = c.consultar_cobranca(txid)

Expand Down
4 changes: 1 addition & 3 deletions examples/pix_cob/criar_cobrança_cpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

from bb_wrapper.wrapper import PIXCobBBWrapper

c = PIXCobBBWrapper(
cert=("./certs/cert.pem", "./certs/key.pem")
)
c = PIXCobBBWrapper(cert=("./certs/cert.pem", "./certs/key.pem"))

data = {
"expiracao": 60 * 60, # 60 segundos = 1 minuto. 60 minutos = 1h
Expand Down
2 changes: 1 addition & 1 deletion tests/wrapper/test_cobrancas.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def test_build_url(self):

expected = (
"https://api.sandbox.bb.com.br/cobrancas/v2/boletos"
f"?gw-dev-app-key={wrapper._BaseBBWrapper__gw_app_key}"
f"?gw-dev-app-key={wrapper._gw_app_key}"
)

self.assertEqual(result, expected)
Expand Down
4 changes: 2 additions & 2 deletions tests/wrapper/test_pagamentos.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_construct_url_1(self):

expected = (
f"https://api.sandbox.bb.com.br/pagamentos-lote/v1/"
f"?gw-dev-app-key={PagamentoLoteBBWrapper()._BaseBBWrapper__gw_app_key}"
f"?gw-dev-app-key={PagamentoLoteBBWrapper()._gw_app_key}"
)

self.assertEqual(expected, result)
Expand All @@ -53,7 +53,7 @@ def test_construct_url_prod(self):

expected = (
f"https://api-ip.bb.com.br/pagamentos-lote/v1/"
f"?gw-dev-app-key={PagamentoLoteBBWrapper()._BaseBBWrapper__gw_app_key}"
f"?gw-dev-app-key={PagamentoLoteBBWrapper()._gw_app_key}"
)

self.assertEqual(expected, result)
Expand Down
4 changes: 2 additions & 2 deletions tests/wrapper/test_pix_cob.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_construct_url_1(self):
"""
result = PIXCobBBWrapper()._construct_url(end_bar=True)

expected = "https://api-pix.hm.bb.com.br/pix/v2/?gw-dev-app-key=KEY"
expected = "https://api.hm.bb.com.br/pix/v2/?gw-dev-app-key=KEY"

self.assertIn(expected, result)

Expand All @@ -188,7 +188,7 @@ def test_construct_url_2(self):
"""
result = PIXCobBBWrapper()._construct_url(end_bar=False)

expected = "https://api-pix.hm.bb.com.br/pix/v2?gw-dev-app-key="
expected = "https://api.hm.bb.com.br/pix/v2?gw-dev-app-key="
self.assertIn(expected, result)

def test_consultar_cobranca_content_bizarro(self):
Expand Down

0 comments on commit 9b9d984

Please sign in to comment.