This repository was archived by the owner on Nov 8, 2018. It is now read-only.
Moved tests for malaria-web app from automated-testing#365
Open
nfebe wants to merge 4 commits intosysters:developfrom
Open
Moved tests for malaria-web app from automated-testing#365nfebe wants to merge 4 commits intosysters:developfrom
nfebe wants to merge 4 commits intosysters:developfrom
Conversation
Signed-off-by: Fenn-25 <fenn25.fn@gmail.com>
Signed-off-by: Fenn-25 <fenn25.fn@gmail.com>
Signed-off-by: Fenn-25 <fenn25.fn@gmail.com>
Signed-off-by: Fenn-25 <fenn25.fn@gmail.com>
sara-02
reviewed
Jul 13, 2018
| self.assertFalse(delete_post_by_id(999)) | ||
| self.assertFalse(delete_post_by_id(999999)) | ||
|
|
||
| def test_get_post_by_id(self): |
Member
There was a problem hiding this comment.
@fenn-cs I have a doubt here, won't the test_get_post_by_id fail? Since test_delete_post_by_id would have deleted the posts, which we are trying to fetch in the second test.
Author
|
@sara-02 It won't because, the setup method is run before every is
followed. It means the db will re repopulated with setup data before the
functions runs. Hope its clearer now.
On 13 Jul 2018 7:38 a.m., "Sarah Masud" <notifications@github.com> wrote:
*@sara-02* commented on this pull request.
------------------------------
In malaria_web/tests.py
<#365 (comment)>:
+ def test_delete_post_by_id(self):
+
+ self.assertTrue(delete_post_by_id(self.post1.id))
+ self.assertTrue(delete_post_by_id(self.post2.id))
+ self.assertFalse(delete_post_by_id(-999999))
+ self.assertFalse(delete_post_by_id(-1))
+ self.assertFalse(delete_post_by_id(100))
+ self.assertFalse(delete_post_by_id(200))
+ self.assertFalse(delete_post_by_id(300))
+ self.assertFalse(delete_post_by_id(400))
+ self.assertFalse(delete_post_by_id(500))
+ self.assertFalse(delete_post_by_id(600))
+ self.assertFalse(delete_post_by_id(999))
+ self.assertFalse(delete_post_by_id(999999))
+
+ def test_get_post_by_id(self):
@fenn-cs <https://github.com/Fenn-CS> I have a doubt here, won't the
test_get_post_by_id fail? Since test_delete_post_by_id would have deleted
the posts, which we are trying to fetch in the second test.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#365 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ANp4zytSTdtLb9iPTsV0MGSY7KlK00jVks5uGEBtgaJpZM4VEtb6>
.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Fenn-25 fenn25.fn@gmail.com
Description
Moved unit tests from automated-testing/MACCTests2017/tests/unit/test_malaria_web.py to
tests.pyof malaria-web module.Fixes #364
Type of Change:
How Has This Been Tested?
Local run.
Checklist: