Skip to content

Commit

Permalink
fix: remove unused fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
gcharest authored Apr 17, 2024
1 parent 779e63e commit b3440c2
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions app/tests/modules/incident/test_schedule_retro.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
"""Unit tests for schedule_retro module in Incident management proces."""

import json
from unittest.mock import patch, MagicMock
from unittest.mock import patch
from datetime import datetime, timedelta
import pytest
import pytz

# from integrations.google_workspace import google_calendar
from modules.incident import schedule_retro

# Mocked dependencies
SRE_BOT_EMAIL = "[email protected]"
SCOPES = ["https://www.googleapis.com/auth/calendar"]


# Fixture to mock the event details JSON string
@pytest.fixture
Expand All @@ -25,20 +21,6 @@ def event_details():
)


# Fixture to mock the calendar service object
@pytest.fixture
def calendar_service_mock():
# Mock for the Google Calendar service object
service_mock = MagicMock()

# Properly set the return value for the execute method to return the expected dictionary directly
service_mock.events.return_value.insert.return_value.execute.return_value = {
"htmlLink": "https://calendar.google.com/event_link"
}

return service_mock


# Fixture to mock the timezone
@pytest.fixture
def est_timezone():
Expand All @@ -62,12 +44,6 @@ def mock_datetime_now(est_timezone):
yield mock_datetime


# Fixture to mock the list of calendars
@pytest.fixture
def items():
return [{"id": "calendar1"}, {"id": "calendar2"}]


# Test out the schedule_event function is successful
@patch("modules.incident.schedule_retro.get_freebusy")
@patch("modules.incident.schedule_retro.find_first_available_slot")
Expand Down

0 comments on commit b3440c2

Please sign in to comment.