Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifiy 'tests/org/tests_edit_org_api.py' and add 'super(EditOrgTestCase,self).tearDown()' function at the end. #101

Open
sahil9001 opened this issue May 26, 2020 · 5 comments
Labels
available No one has claimed the issue (or) is working on it. good first issue Good for newcomers

Comments

@sahil9001
Copy link
Member

sahil9001 commented May 26, 2020

Is your feature request related to a problem? Please describe.
Currently the def tearDown(self): function only deletes the auth_user after each test but we want to delete whole objects created by setUp(self) and super class setUp() .

Describe the solution you'd like
Call super(EditOrgTestCase,self).tearDown() in tests/org/tests_edit_org_api.py in tearDown(). Also make other appropriate changes to tearDown() as needed.

@sahil9001 sahil9001 changed the title Modifiy tests/org/tests_edit_org_api.py and add super(EditOrgTestCase,self).tearDown() function at the end. Modifiy 'tests/org/tests_edit_org_api.py' and add 'super(EditOrgTestCase,self).tearDown()' function at the end. May 26, 2020
@sahil9001 sahil9001 added good first issue Good for newcomers available No one has claimed the issue (or) is working on it. labels May 26, 2020
@adityatiwari23
Copy link
Contributor

I am not very much sure that I will be able to fix the issue easily but I want to have a try.
If you could guide how to resolve the issue, it would be very helpful for me.

@sahil9001
Copy link
Member Author

self.auth_user.delete()

This above function call deletes the auth_user only, but we want to delete all of the objects created by test database after each test, so you could replace that line with super(EditOrgTestCase,self).tearDown()

@adityatiwari23
Copy link
Contributor

adityatiwari23 commented Jun 10, 2020

@sahil9001 sir
Should i just replace self.auth_user.delete() with
super(EditOrgTestCase,self).tearDown()

Or this should be added at the last

@sahil9001
Copy link
Member Author

sahil9001 commented Jun 10, 2020

Yes, that's what you want to do here. Just replace self.auth_user.delete() with super(EditOrgTestCase,self).tearDown()

@sahil9001 sahil9001 added claimed and removed available No one has claimed the issue (or) is working on it. labels Jun 11, 2020
@priyanshisharma
Copy link
Member

@sahil9001 @adityatiwar1

Sorry 😓 Good first issues are reserved for FIRST TIME CONTRIBUTORS

Since, @adityatiwar1 has already contributed to this repository by solving #113 with #126 , he isn't eligible to work on this. Sorry to let you down.

@priyanshisharma priyanshisharma added available No one has claimed the issue (or) is working on it. and removed claimed labels Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available No one has claimed the issue (or) is working on it. good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants