-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The involved mentor cannot update the mentorship status to PENDING #131 #142
base: main
Are you sure you want to change the base?
Conversation
|
||
response = self.client.put(f'/api/mentorship/request/{mentorshipreq_uid}/',data=respond_data) | ||
self.assertEqual(response.status_code, 403) | ||
self.assertEqual(self.mentorship_req.status,MentorshipRequestStatus.REQUEST_ACCEPTED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before asserting refresh the mentorship_req
from db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log out the user before ending the test. Do this in next function as well
respond_data={ | ||
'mentor': self.mentor.uid, | ||
'mentee': self.mentee.uid, | ||
'status' : MentorshipRequestStatus.REQUEST_REJECTED ,#Accepting the request., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the comment here and below as well
|
||
response = self.client.put(f'/api/mentorship/request/{mentorshipreq_uid}/',data=respond_data) | ||
self.assertEqual(response.status_code, 403) | ||
self.assertEqual(self.mentorship_req.status,MentorshipRequestStatus.REQUEST_REJECTED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before asserting refresh the mentorship_req from db
# Making mentor available to take mentorship request from all types of mentees | ||
response = self.client.patch(f'/api/mentor/mentor/{self.mentor.uid}/', data=self.data, content_type='application/json', follow=True) | ||
self.assertEqual(response.status_code, 200) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logout the mentor
closes #131