Skip to content

Commit b06b8c3

Browse files
committed
Tweak potentially ambiguous regular expressions
1 parent 5b9d8c1 commit b06b8c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/test_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ def test_inexisting_service() -> None:
2525

2626
@pytest.mark.live
2727
def test_insecure_dh_hack_required() -> None:
28-
with pytest.raises(SSLError, match="SSL: DH_KEY_TOO_SMALL. dh key too small"):
28+
with pytest.raises(SSLError, match="SSL: DH_KEY_TOO_SMALL\\] dh key too small"):
2929
requests.get("https://servicios1.afip.gov.ar/wsfev1/service.asmx?WSDL")

tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def test_approximate_date_failure() -> None:
601601

602602
with pytest.raises(
603603
exceptions.DjangoAfipException,
604-
match="Expected to update one receipt, updated 0.",
604+
match="Expected to update one receipt, updated 0\\.",
605605
):
606606
receipt.approximate_date()
607607

tests/test_webservices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_authentication_with_bad_cuit() -> None:
3232
with pytest.raises(
3333
exceptions.AfipException,
3434
# Note: AFIP apparently edited this message and added a typo:
35-
match="ValidacionDeToken: No apareci[oó] CUIT en lista de relaciones:",
35+
match=r"ValidacionDeToken: No apareci[oó] CUIT en lista de relaciones:",
3636
):
3737
taxpayer.fetch_points_of_sales()
3838

@@ -67,7 +67,7 @@ def test_authentication_with_no_active_taxpayer() -> None:
6767
"""Test that no TaxPayers raises an understandable error."""
6868
with pytest.raises(
6969
exceptions.AuthenticationError,
70-
match="There are no taxpayers to generate a ticket.",
70+
match="There are no taxpayers to generate a ticket\\.",
7171
):
7272
models.AuthTicket.objects.get_any_active("wsfe")
7373

0 commit comments

Comments
 (0)