Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bhaveshsood13
Copy link
Collaborator

closes #131


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)
Copy link
Collaborator

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

Copy link
Collaborator

@prince17080 prince17080 Oct 28, 2021

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.,
Copy link
Collaborator

@prince17080 prince17080 Oct 28, 2021

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)
Copy link
Collaborator

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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logout the mentor

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The involved mentor cannot update the mentorship status to PENDING
2 participants