fix: update key name for save/program api (#29798)

update key name from uuid to program_uuid for save/program/ api.
This commit is contained in:
Mubbshar Anwar
2022-01-21 14:13:48 +05:00
committed by GitHub
parent e63fb2e01a
commit 615658b18e
2 changed files with 4 additions and 4 deletions

View File

@@ -125,7 +125,7 @@ class ProgramSaveForLaterApiViewTest(ThirdPartyAuthTestMixin, APITestCase):
mock_get_programs.return_value = self.program
request_payload = {
'email': self.email,
'uuid': self.uuid,
'program_uuid': self.uuid,
}
response = self.client.post(self.api_url, data=request_payload)
assert response.status_code == 200
@@ -144,7 +144,7 @@ class ProgramSaveForLaterApiViewTest(ThirdPartyAuthTestMixin, APITestCase):
"""
request_payload = {
'email': self.email,
'uuid': self.uuid,
'program_uuid': self.uuid,
}
for _ in range(int(settings.SAVE_FOR_LATER_EMAIL_RATE_LIMIT.split('/')[0])):
response = self.client.post(self.api_url, data=request_payload)
@@ -167,6 +167,6 @@ class ProgramSaveForLaterApiViewTest(ThirdPartyAuthTestMixin, APITestCase):
"""
Test email validation
"""
request_payload = {'email': self.invalid_email, 'uuid': self.uuid}
request_payload = {'email': self.invalid_email, 'program_uuid': self.uuid}
response = self.client.post(self.api_url, data=request_payload)
assert response.status_code == 400

View File

@@ -118,7 +118,7 @@ class ProgramSaveForLaterApiView(APIView):
"""
user = request.user
data = request.data
program_uuid = data.get('uuid')
program_uuid = data.get('program_uuid')
email = data.get('email')
if getattr(request, 'limited', False):