-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e6e72a
commit f2b7ce8
Showing
1 changed file
with
0 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|