Skip to content

Commit c040c79

Browse files
committed
Rebase with latest changes and adjust tests
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent fc052a8 commit c040c79

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

vulnerabilities/tests/test_throttling.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import json
1111

12-
from django.contrib.auth import get_user_model
1312
from rest_framework.test import APIClient
1413
from rest_framework.test import APITestCase
1514

@@ -102,16 +101,16 @@ def test_aliases_endpoint_throttling(self):
102101

103102
# A basic user can only access /alias 2 times a day
104103
for i in range(0, 2):
105-
response = self.csrf_client.get("/api/alias")
104+
response = self.csrf_client.get("/api/aliases")
106105
self.assertEqual(response.status_code, 200)
107-
response = self.staff_csrf_client.get("/api/alias")
106+
response = self.staff_csrf_client.get("/api/aliases")
108107
self.assertEqual(response.status_code, 200)
109108

110-
response = self.csrf_client.get("/api/alias")
109+
response = self.csrf_client.get("/api/aliases")
111110
# 429 - too many requests for basic user
112111
self.assertEqual(response.status_code, 429)
113112

114-
response = self.staff_csrf_client.get("/api/alias", format="json")
113+
response = self.staff_csrf_client.get("/api/aliases", format="json")
115114
# 200 - staff user can access API unlimited times
116115
self.assertEqual(response.status_code, 200)
117116

0 commit comments

Comments
 (0)