Changed all instances of deprecated self.failUnless() unittest method to self.assertTrue().
- Legacy-Id: 13515
This commit is contained in:
parent
7ae80407db
commit
2e20d9df66
|
@ -716,7 +716,7 @@ class ReviewTests(TestCase):
|
|||
# than 80.
|
||||
body = outbox[2].get_payload(decode=True).decode("utf-8")
|
||||
self.assertIn('really, really, really', body)
|
||||
self.assertTrue(not any( len(line) > 80 for line in body.splitlines() ))
|
||||
self.assertTrue(all( len(line) <= 80 for line in body.splitlines() ))
|
||||
|
||||
|
||||
def test_revise_review_enter_content(self):
|
||||
|
|
|
@ -26,7 +26,7 @@ class GroupsTest(TestCase):
|
|||
response = self.client.post(url,post_data,follow=True)
|
||||
#assert False, response.content
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless(group.acronym in response.content)
|
||||
self.assertTrue(group.acronym in response.content)
|
||||
|
||||
# ------- Test Add -------- #
|
||||
def test_add_button(self):
|
||||
|
@ -47,7 +47,7 @@ class GroupsTest(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless('This field is required' in response.content)
|
||||
self.assertTrue('This field is required' in response.content)
|
||||
|
||||
def test_add_group_dupe(self):
|
||||
make_test_data()
|
||||
|
@ -66,7 +66,7 @@ class GroupsTest(TestCase):
|
|||
response = self.client.post(url,post_data)
|
||||
#print response.content
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless('Group with this Acronym already exists' in response.content)
|
||||
self.assertTrue('Group with this Acronym already exists' in response.content)
|
||||
|
||||
def test_add_group_success(self):
|
||||
make_test_data()
|
||||
|
@ -113,7 +113,7 @@ class GroupsTest(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data,follow=True)
|
||||
self.assertRedirects(response, target)
|
||||
self.failUnless('changed successfully' in response.content)
|
||||
self.assertTrue('changed successfully' in response.content)
|
||||
|
||||
def test_edit_non_wg_group(self):
|
||||
make_test_data()
|
||||
|
@ -133,7 +133,7 @@ class GroupsTest(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data,follow=True)
|
||||
self.assertRedirects(response, target)
|
||||
self.failUnless('changed successfully' in response.content)
|
||||
self.assertTrue('changed successfully' in response.content)
|
||||
|
||||
# ------- Test People -------- #
|
||||
def test_people_delete(self):
|
||||
|
@ -145,7 +145,7 @@ class GroupsTest(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.get(url,follow=True)
|
||||
self.assertRedirects(response, target)
|
||||
self.failUnless('deleted successfully' in response.content)
|
||||
self.assertTrue('deleted successfully' in response.content)
|
||||
|
||||
def test_people_add(self):
|
||||
make_test_data()
|
||||
|
@ -160,4 +160,4 @@ class GroupsTest(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data,follow=True)
|
||||
self.assertRedirects(response, url)
|
||||
self.failUnless('added successfully' in response.content)
|
||||
self.assertTrue('added successfully' in response.content)
|
||||
|
|
|
@ -133,7 +133,7 @@ class RecordingTestCase(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,data,follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless(group.acronym in response.content)
|
||||
self.assertTrue(group.acronym in response.content)
|
||||
|
||||
# now test edit
|
||||
doc = session.materials.filter(type='recording').first()
|
||||
|
@ -141,7 +141,7 @@ class RecordingTestCase(TestCase):
|
|||
url = reverse('ietf.secr.proceedings.views.recording_edit', kwargs={'meeting_num':meeting.number,'name':doc.name})
|
||||
response = self.client.post(url,dict(external_url=external_url),follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless(external_url in response.content)
|
||||
self.assertTrue(external_url in response.content)
|
||||
|
||||
def test_import_audio_files(self):
|
||||
meeting = make_meeting_test_data()
|
||||
|
|
|
@ -33,7 +33,7 @@ class SecrRolesMainTestCase(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.get(url,follow=True)
|
||||
self.assertRedirects(response, target)
|
||||
self.failUnless('deleted successfully' in response.content)
|
||||
self.assertTrue('deleted successfully' in response.content)
|
||||
|
||||
def test_roles_add(self):
|
||||
make_test_data()
|
||||
|
@ -50,7 +50,7 @@ class SecrRolesMainTestCase(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data,follow=True)
|
||||
self.assertRedirects(response, target)
|
||||
self.failUnless('added successfully' in response.content)
|
||||
self.assertTrue('added successfully' in response.content)
|
||||
|
||||
def test_roles_add_no_group(self):
|
||||
make_test_data()
|
||||
|
@ -65,4 +65,4 @@ class SecrRolesMainTestCase(TestCase):
|
|||
self.client.login(username="secretary", password="secretary+password")
|
||||
response = self.client.post(url,post_data,follow=True)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.failUnless('You must select a group' in response.content)
|
||||
self.assertTrue('You must select a group' in response.content)
|
||||
|
|
Loading…
Reference in a new issue