Skip to content

Commit 69d921d

Browse files
committed
fix: Alias validator import to avoid collision
1 parent 5e794a3 commit 69d921d

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

netsgiro/objects.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
TransmissionStart,
3131
)
3232
from netsgiro.records import parse as records_parse
33-
from netsgiro.validators import str_of_length, validate_due_date
33+
from netsgiro.validators import str_of_length
34+
from netsgiro.validators import validate_due_date as _validate_due_date
3435

3536
if TYPE_CHECKING:
3637
from netsgiro.enums import AvtaleGiroRegistrationType
@@ -382,7 +383,7 @@ def add_payment_request(
382383

383384
if validate_due_date:
384385
# Make sure we're not passing invalid due dates
385-
validate_due_date(due_date)
386+
_validate_due_date(due_date)
386387

387388
if bank_notification:
388389
transaction_type = TransactionType.AVTALEGIRO_WITH_BANK_NOTIFICATION

tests/test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def test_minimum_due_date_after_cutoff():
2626
generated after 14:00 Norwegian time should be adjusted by 5 days.
2727
"""
2828
assert (
29-
get_minimum_due_date(monday_after_cutoff)
30-
== (monday_after_cutoff + timedelta(days=5)).date()
29+
get_minimum_due_date(monday_after_cutoff)
30+
== (monday_after_cutoff + timedelta(days=5)).date()
3131
)
3232

3333

@@ -51,8 +51,8 @@ def test_minimum_due_date_with_holidays_after_cutoff():
5151
holidays is upped to 3, so we expect 2 more days of offsetting.
5252
"""
5353
assert (
54-
get_minimum_due_date(day_before_easter_after_cutoff)
55-
== (day_before_easter_after_cutoff + timedelta(days=8)).date()
54+
get_minimum_due_date(day_before_easter_after_cutoff)
55+
== (day_before_easter_after_cutoff + timedelta(days=8)).date()
5656
)
5757

5858

0 commit comments

Comments
 (0)