systers / macc

Server side support platform for Peace Corps mobile applications.
http://macc.systers.org/
9 stars 51 forks source link

Moved tests for malaria-web app from automated-testing #365

Open nfebe opened 6 years ago

nfebe commented 6 years ago

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.py of malaria-web module.

Fixes #364

Type of Change:

How Has This Been Tested?

Local run.

Checklist:

nfebe commented 6 years ago

@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 https://github.com/systers/macc/pull/365#discussion_r202255949:

  • 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 https://github.com/systers/macc/pull/365#pullrequestreview-136920010, or mute the thread https://github.com/notifications/unsubscribe-auth/ANp4zytSTdtLb9iPTsV0MGSY7KlK00jVks5uGEBtgaJpZM4VEtb6 .