Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated settings #3034

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixed timezone aware setup in factories
smilerz committed Mar 14, 2024
commit 98654d9aca275409a83af5aae574fc0f86323bed
4 changes: 2 additions & 2 deletions cookbook/tests/factories/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import inspect
from datetime import date
from datetime import datetime
from decimal import Decimal

import factory
@@ -356,7 +356,7 @@ class RecipeFactory(factory.django.DjangoModelFactory):
waiting_time = factory.LazyAttribute(lambda x: faker.random_int(min=0, max=360))
internal = False
created_by = factory.SubFactory(UserFactory, space=factory.SelfAttribute('..space'))
created_at = factory.LazyAttribute(lambda x: faker.date_between_dates(date_start=pytz.UTC.localize(date(2000, 1, 1)), date_end=pytz.UTC.localize(date(2020, 12, 31))))
created_at = factory.LazyAttribute(lambda x: faker.date_between_dates(date_start=pytz.UTC.localize(datetime(2000, 1, 1)), date_end=pytz.UTC.localize(datetime(2020, 12, 31))))
space = factory.SubFactory(SpaceFactory)

@classmethod