Skip to content

Commit

Permalink
fix(formatting): ran "black . && isort . && flake8" with no warnings
Browse files Browse the repository at this point in the history
refs KK-1108
  • Loading branch information
karisal-anders committed Jun 19, 2024
1 parent cd42afa commit 642aa6d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 35 deletions.
36 changes: 18 additions & 18 deletions common/tests/snapshots/snap_test_qrcode_service.py

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions events/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@
project = ProjectFactory.build(pk=uuid4(), year=2020)
event = EventFactory.build(pk=uuid4(), project=project)
event_group = EventGroupFactory.build(pk=uuid4(), project=project)
event_with_event_group = EventFactory.build(pk=uuid4(), project=project, event_group=event_group)
event_with_event_group = EventFactory.build(
pk=uuid4(), project=project, event_group=event_group
)
venue = VenueFactory.build(pk=uuid4(), project=project)
guardian = GuardianFactory.build(pk=uuid4())
child = ChildWithGuardianFactory.build(pk=uuid4(), relationship__guardian=guardian, project=project)
child = ChildWithGuardianFactory.build(
pk=uuid4(), relationship__guardian=guardian, project=project
)
occurrence = OccurrenceFactory.build(pk=uuid4(), event=event, venue=venue)
enrolment = EnrolmentFactory.build(pk=uuid4(), occurrence=occurrence, child=child)
unsubscribe_url = "https://kukkuu-ui-domain/fi/profile/subscriptions?authToken=abc123"
Expand Down
24 changes: 13 additions & 11 deletions events/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,9 @@ def test_enrol_limit_reached(
enrolled_amount + 1,
time=timezone.now(),
event__published_at=timezone.now(),
event__ticket_system=Event.TICKETMASTER
if use_ticket_system_passwords
else Event.INTERNAL,
event__ticket_system=(
Event.TICKETMASTER if use_ticket_system_passwords else Event.INTERNAL
),
)
for i in range(enrolled_amount):
# Previous enrolments have been with TicketSystemPasswords
Expand Down Expand Up @@ -1672,19 +1672,21 @@ def test_events_and_event_groups_query_upcoming_filter(
time=not_visible,
event__name="Not visible",
event__published_at=not_visible,
event__event_group=EventGroupFactory(
name="Not visible", published_at=not_visible
)
if has_event_group
else None,
event__event_group=(
EventGroupFactory(name="Not visible", published_at=not_visible)
if has_event_group
else None
),
)
OccurrenceFactory.create(
time=future,
event__name="In the future",
event__published_at=now(),
event__event_group=EventGroupFactory(name="In the future", published_at=now())
if has_event_group
else None,
event__event_group=(
EventGroupFactory(name="In the future", published_at=now())
if has_event_group
else None
),
)

executed = guardian_api_client.execute(
Expand Down
6 changes: 3 additions & 3 deletions importers/tests/snapshots/snap_test_notification_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
] = """event_published|event_published fi original subject|event_published en original subject|event_published sv original subject|event_published fi original body_text|event_published en original body_text|event_published sv original body_text|||
occurrence_enrolment|occurrence_enrolment fi updated subject|occurrence_enrolment en updated subject|occurrence_enrolment sv updated subject|occurrence_enrolment fi updated body_text|occurrence_enrolment en updated body_text|occurrence_enrolment sv updated body_text|||"""

snapshots[
"test_update_notifications 1"
] = "event_published|event_published fi updated subject|event_published en updated subject|event_published sv updated subject|event_published fi updated body_text|event_published en updated body_text|event_published sv updated body_text|||"
snapshots["test_update_notifications 1"] = (
"event_published|event_published fi updated subject|event_published en updated subject|event_published sv updated subject|event_published fi updated body_text|event_published en updated body_text|event_published sv updated body_text|||"
)
4 changes: 3 additions & 1 deletion subscriptions/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
event = EventFactory.build(pk=uuid4(), project=project)
venue = VenueFactory.build(pk=uuid4(), project=project)
guardian = GuardianFactory.build(pk=uuid4())
child = ChildWithGuardianFactory.build(pk=uuid4(), relationship__guardian=guardian, project=project)
child = ChildWithGuardianFactory.build(
pk=uuid4(), relationship__guardian=guardian, project=project
)
occurrence = OccurrenceFactory.build(pk=uuid4(), event=event, venue=venue)
subscription = FreeSpotNotificationSubscriptionFactory.build(
pk=uuid4(), child=child, occurrence=occurrence
Expand Down

0 comments on commit 642aa6d

Please sign in to comment.