Skip to content

Commit

Permalink
chore(deps): update dependency faker to v30 (#3224)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency faker to v30

* test: fix tests

* update poetry lock

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Asad Ali <[email protected]>
  • Loading branch information
renovate[bot] and asadali145 authored Nov 13, 2024
1 parent ed8de98 commit 416eea9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions courses/serializers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ecommerce.factories import ProductVersionFactory
from ecommerce.models import Order
from ecommerce.serializers import CompanySerializer
from ecommerce.serializers_test import datetime_format
from ecommerce.serializers_test import datetime_millis_format
from mitxpro.test_utils import assert_drf_json_equal, drf_datetime

pytestmark = [pytest.mark.django_db]
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_serialize_program( # noqa: PLR0913
"start_date": program.first_unexpired_run.start_date,
"end_date": sorted(runs, key=lambda run: run.end_date)[
-1
].end_date.strftime(datetime_format),
].end_date.strftime(datetime_millis_format),
"enrollment_start": program.first_unexpired_run.enrollment_start,
"url": f"http://localhost{program.page.get_url()}",
"instructors": [{"name": name} for name in faculty_names],
Expand All @@ -164,7 +164,7 @@ def test_serialize_program( # noqa: PLR0913
"availability": "dated",
},
)
assert data["end_date"] != non_live_run.end_date.strftime(datetime_format)
assert data["end_date"] != non_live_run.end_date.strftime(datetime_millis_format)


def test_base_course_serializer():
Expand Down
10 changes: 7 additions & 3 deletions ecommerce/serializers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def test_serialize_coupon_payment_version_serializer(basket_and_coupons):
for attr in ("activation_date", "expiration_date"):
assert serializer.data.get(attr) == getattr(
basket_and_coupons.coupongroup_best.payment_version, attr
).strftime(datetime_format)
).strftime(datetime_millis_format)
assert (
Decimal(serializer.data.get("amount"))
== basket_and_coupons.coupongroup_best.payment_version.amount
Expand Down Expand Up @@ -409,8 +409,12 @@ def test_coupon_payment_version_serializer():
"max_redemptions": payment_version.max_redemptions,
"max_redemptions_per_user": payment_version.max_redemptions_per_user,
"amount": str(payment_version.amount),
"expiration_date": payment_version.expiration_date.strftime(datetime_format),
"activation_date": payment_version.activation_date.strftime(datetime_format),
"expiration_date": payment_version.expiration_date.strftime(
datetime_millis_format
),
"activation_date": payment_version.activation_date.strftime(
datetime_millis_format
),
"payment_type": payment_version.payment_type,
"discount_type": DISCOUNT_TYPE_PERCENT_OFF,
"payment_transaction": payment_version.payment_transaction,
Expand Down
11 changes: 6 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ zeep = "4.3.1"
bpython = "*"
django-debug-toolbar = "*"
factory-boy = "3.3.1"
faker = "13.16.0"
faker = "30.8.2"
freezegun = "1.5.1"
hypothesis = "4.24.6"
ipdb = "*"
Expand Down

0 comments on commit 416eea9

Please sign in to comment.