-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove reservee language from reservations
Use user.preferred_language instead
- Loading branch information
1 parent
c05a139
commit e527894
Showing
25 changed files
with
46 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ def test_get_verkkokauppa_order_params__to_json(): | |
email="test@localhost", | ||
first_name="First", | ||
last_name="Last", | ||
preferred_language="fi", | ||
) | ||
reservation = ReservationFactory.create( | ||
reservation_units=[reservation_unit], | ||
|
@@ -39,15 +40,14 @@ def test_get_verkkokauppa_order_params__to_json(): | |
reservee_last_name="Lastname", | ||
reservee_email="[email protected]", | ||
reservee_phone="+358 50 123 4567", | ||
reservee_language="fi", | ||
) | ||
|
||
order_params = get_verkkokauppa_order_params(reservation) | ||
json = order_params.to_json() | ||
|
||
assert json["namespace"] == settings.VERKKOKAUPPA_NAMESPACE | ||
assert json["user"] == str(reservation.user.uuid) | ||
assert json["language"] == reservation.reservee_language or "fi" | ||
assert json["language"] == reservation.user.get_preferred_language() | ||
assert json["priceNet"] == "10.12" | ||
assert json["priceVat"] == "2.43" | ||
assert json["priceTotal"] == "12.55" | ||
|
@@ -93,6 +93,7 @@ def test_get_verkkokauppa_order_params__to_json__meta_label_language_support(): | |
email="test@localhost", | ||
first_name="First", | ||
last_name="Name", | ||
preferred_language="en", | ||
) | ||
reservation = ReservationFactory.create( | ||
reservation_units=[reservation_unit], | ||
|
@@ -104,7 +105,6 @@ def test_get_verkkokauppa_order_params__to_json__meta_label_language_support(): | |
reservee_last_name="Lastname", | ||
reservee_email="[email protected]", | ||
reservee_phone="+358 50 123 4567", | ||
reservee_language="en", | ||
) | ||
|
||
order_params = get_verkkokauppa_order_params(reservation) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,6 @@ def test_get_reservation_email_recipients__no_user(): | |
reservation = ReservationFactory.create( | ||
user=None, | ||
reservee_email="[email protected]", | ||
reservee_language=Language.EN.value, | ||
) | ||
|
||
result = get_reservation_email_recipients(reservation) | ||
|
@@ -79,7 +78,6 @@ def test_get_reservation_email_recipients__no_reservee_email_or_user(): | |
reservation = ReservationFactory.create( | ||
user=None, | ||
reservee_email="", | ||
reservee_language=Language.EN.value, | ||
) | ||
|
||
result = get_reservation_email_recipients(reservation) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.