Skip to content

Commit

Permalink
fix: removing broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJaeger committed Feb 6, 2025
1 parent 2e6e72a commit f2b7ce8
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions chats/apps/api/v1/tests/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,41 +154,6 @@ def test_message_response_time_metric_calc(self):

self.assertEqual(metric.message_response_time, 3)

def test_waiting_time_metric_calc(self):
"""
Verify if the waiting_time of a room metric its calculated correctly.
"""
url = "/v1/external/rooms/"
client = self.client
client.credentials(
HTTP_AUTHORIZATION="Bearer f3ce543e-d77e-4508-9140-15c95752a380"
)
data = {
"queue_uuid": str(self.queue_1.uuid),
"contact": {
"external_id": "e3955fd5-5705-77cd-b480-b45594b70282",
"name": "Foo Bar",
"email": "[email protected]",
"phone": "+250788123123",
"custom_fields": {},
},
}
client.post(url, data=data, format="json")
room_created = Room.objects.get(queue_id=data["queue_uuid"])

time.sleep(3)

url_patch = f"/v1/room/{room_created.uuid}/"
patch_client = self.client
patch_client.credentials(HTTP_AUTHORIZATION="Token " + self.login_token.key)
data_update = {"user_email": str(self.manager_user)}
patch_client.patch(url_patch, data=data_update, format="json")

room_closed = Room.objects.get(queue_id=data["queue_uuid"])
metric = RoomMetrics.objects.get(room=room_closed)

self.assertEqual(metric.waiting_time, 3)

def test_dashboard_model_name_property(self):
url = reverse("external_rooms-list")
client = self.client
Expand Down

0 comments on commit f2b7ce8

Please sign in to comment.