def test_delete_volunteer_resume(self): """ Tests delete_volunteer_resume(volunteer_id) """ self.v1.resume_file = "MyResume.pdf" self.v1.save() self.assertTrue(delete_volunteer_resume(self.v1.id)) self.assertFalse(delete_volunteer(1000))
def test_delete_volunteer_resume(self): """ Tests delete_volunteer_resume(volunteer_id) """ self.v1.resume_file="MyResume.pdf" self.v1.save() self.assertTrue(delete_volunteer_resume(self.v1.id)) self.assertFalse(delete_volunteer(100))
def test_delete_volunteer(self): self.assertTrue(delete_volunteer(self.v1.id)) self.assertTrue(delete_volunteer(self.v2.id)) self.assertTrue(delete_volunteer(self.v3.id)) self.assertFalse(delete_volunteer(1000)) self.assertFalse(delete_volunteer(2000)) self.assertFalse(delete_volunteer(3000))
def test_delete_volunteer(self): self.assertTrue(delete_volunteer(self.v1.id)) self.assertTrue(delete_volunteer(self.v2.id)) self.assertTrue(delete_volunteer(self.v3.id)) self.assertFalse(delete_volunteer(100)) self.assertFalse(delete_volunteer(200)) self.assertFalse(delete_volunteer(300))
def test_delete_volunteer(self): u1 = User.objects.create_user('Yoshi') u2 = User.objects.create_user('Ashley') u3 = User.objects.create_user('Zelda') v1 = Volunteer( first_name="Yoshi", last_name="Doe", address="7 Oak Street", city="Elmgrove", state="California", country="USA", phone_number="23454545", email="*****@*****.**", user=u1 ) v2 = Volunteer( first_name="Ashley", last_name="Doe", address="7 Alpine Street", city="Maplegrove", state="Wyoming", country="USA", phone_number="23454545", email="*****@*****.**", user=u2 ) v3 = Volunteer( id=999, first_name="Zelda", last_name="Doe", address="7 Elm Street", city="Oakgrove", state="California", country="USA", phone_number="23454545", email="*****@*****.**", user=u3 ) v1.save() v2.save() v3.save() self.assertTrue(delete_volunteer(v1.id)) self.assertTrue(delete_volunteer(v2.id)) self.assertTrue(delete_volunteer(v3.id)) self.assertFalse(delete_volunteer(100)) self.assertFalse(delete_volunteer(200)) self.assertFalse(delete_volunteer(300))
def test_delete_volunteer_resume(self): """ Tests delete_volunteer_resume(volunteer_id) """ u1 = User.objects.create_user('John') v1 = Volunteer( first_name="John", last_name="Doe", address="7 Alpine Street", city="Maplegrove", state="Wyoming", country="USA", phone_number="23454545", email="*****@*****.**", resume_file="MyResume.pdf", user=u1 ) v1.save() self.assertTrue(delete_volunteer_resume(v1.id)) self.assertFalse(delete_volunteer(100))