From 416eea948ecd6e09e1fb2db4af3a5d0dfaa3d0e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:20:36 +0500 Subject: [PATCH] chore(deps): update dependency faker to v30 (#3224) * 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 --- courses/serializers_test.py | 6 +++--- ecommerce/serializers_test.py | 10 +++++++--- poetry.lock | 11 ++++++----- pyproject.toml | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/courses/serializers_test.py b/courses/serializers_test.py index 5491839d4..e88148053 100644 --- a/courses/serializers_test.py +++ b/courses/serializers_test.py @@ -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] @@ -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], @@ -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(): diff --git a/ecommerce/serializers_test.py b/ecommerce/serializers_test.py index 19b13c849..ffa768055 100644 --- a/ecommerce/serializers_test.py +++ b/ecommerce/serializers_test.py @@ -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 @@ -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, diff --git a/poetry.lock b/poetry.lock index 76f2843ef..aeaf6d339 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1315,17 +1315,18 @@ doc = ["Sphinx", "sphinx-rtd-theme", "sphinxcontrib-spelling"] [[package]] name = "faker" -version = "13.16.0" +version = "30.8.2" description = "Faker is a Python package that generates fake data for you." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "Faker-13.16.0-py3-none-any.whl", hash = "sha256:920f94d5aa865fd922bc29f2cf75c75b4d86b30eec23e7174d7513241b759b05"}, - {file = "Faker-13.16.0.tar.gz", hash = "sha256:25c5be99bc5fd8676eea8c1490e0de87f6d9734651c7af2cefc99b322b2936f4"}, + {file = "Faker-30.8.2-py3-none-any.whl", hash = "sha256:4a82b2908cd19f3bba1a4da2060cc4eb18a40410ccdf9350d071d79dc92fe3ce"}, + {file = "faker-30.8.2.tar.gz", hash = "sha256:aa31b52cdae3673d6a78b4857c7bcdc0e98f201a5cb77d7827fa9e6b5876da94"}, ] [package.dependencies] python-dateutil = ">=2.4" +typing-extensions = "*" [[package]] name = "fancycompleter" @@ -4198,4 +4199,4 @@ xmlsec = ["xmlsec (>=0.6.1)"] [metadata] lock-version = "2.0" python-versions = "3.12.6" -content-hash = "b686b98b63af22e4953da57a549f228335d5a0467be034a7f31c6f6e5fd294b9" +content-hash = "cbf9163f8ea09d5254c1cfe3808c0a007ec439d36f3410cf1f5689a99f695dbb" diff --git a/pyproject.toml b/pyproject.toml index e4fd9661b..ebb93f3e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = "*"