Commit 7870c067 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

Change deprecated assertEquals to assertEqual


Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 49637d17
...@@ -509,19 +509,19 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -509,19 +509,19 @@ class MultipleProjectsPerMailingListTest(TestCase):
def testTagList(self): def testTagList(self):
self.project1.subject_prefix_tags = '' self.project1.subject_prefix_tags = ''
self.assertEquals(self.project1.get_subject_prefix_tags(), []) self.assertEqual(self.project1.get_subject_prefix_tags(), [])
self.project1.subject_prefix_tags = ' ' self.project1.subject_prefix_tags = ' '
self.assertEquals(self.project1.get_subject_prefix_tags(), []) self.assertEqual(self.project1.get_subject_prefix_tags(), [])
self.project1.subject_prefix_tags = 'i-g-t' self.project1.subject_prefix_tags = 'i-g-t'
self.assertEquals(self.project1.get_subject_prefix_tags(), ['i-g-t']) self.assertEqual(self.project1.get_subject_prefix_tags(), ['i-g-t'])
self.project1.subject_prefix_tags = 'a,b' self.project1.subject_prefix_tags = 'a,b'
self.assertEquals(self.project1.get_subject_prefix_tags(), ['a', 'b']) self.assertEqual(self.project1.get_subject_prefix_tags(), ['a', 'b'])
self.project1.subject_prefix_tags = 'a, ,b,' self.project1.subject_prefix_tags = 'a, ,b,'
self.assertEquals(self.project1.get_subject_prefix_tags(), ['a', 'b']) self.assertEqual(self.project1.get_subject_prefix_tags(), ['a', 'b'])
def testSingleTag(self): def testSingleTag(self):
self.project2.subject_prefix_tags = 'i-g-t' self.project2.subject_prefix_tags = 'i-g-t'
...@@ -529,10 +529,10 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -529,10 +529,10 @@ class MultipleProjectsPerMailingListTest(TestCase):
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH] Subject') subject='[PATCH] Subject')
self.assertEquals(find_project(email), self.project1) self.assertEqual(find_project(email), self.project1)
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH i-g-t] Subject') subject='[PATCH i-g-t] Subject')
self.assertEquals(find_project(email), self.project2) self.assertEqual(find_project(email), self.project2)
def testSingleTagInverted(self): def testSingleTagInverted(self):
"""To test the order_by()""" """To test the order_by()"""
...@@ -541,10 +541,10 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -541,10 +541,10 @@ class MultipleProjectsPerMailingListTest(TestCase):
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH i-g-t] Subject') subject='[PATCH i-g-t] Subject')
self.assertEquals(find_project(email), self.project1) self.assertEqual(find_project(email), self.project1)
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH] Subject') subject='[PATCH] Subject')
self.assertEquals(find_project(email), self.project2) self.assertEqual(find_project(email), self.project2)
def testMultipleTags(self): def testMultipleTags(self):
self.project2.subject_prefix_tags = 'i-g-t,intel-gpu-tools' self.project2.subject_prefix_tags = 'i-g-t,intel-gpu-tools'
...@@ -552,13 +552,13 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -552,13 +552,13 @@ class MultipleProjectsPerMailingListTest(TestCase):
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH] Subject') subject='[PATCH] Subject')
self.assertEquals(find_project(email), self.project1) self.assertEqual(find_project(email), self.project1)
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH i-g-t] Subject') subject='[PATCH i-g-t] Subject')
self.assertEquals(find_project(email), self.project2) self.assertEqual(find_project(email), self.project2)
email = create_email(defaults.patch, project=self.project1, email = create_email(defaults.patch, project=self.project1,
subject='[PATCH intel-gpu-tools] Subject') subject='[PATCH intel-gpu-tools] Subject')
self.assertEquals(find_project(email), self.project2) self.assertEqual(find_project(email), self.project2)
def testStripTag(self): def testStripTag(self):
self.project2.subject_prefix_tags = 'i-g-t' self.project2.subject_prefix_tags = 'i-g-t'
...@@ -567,7 +567,7 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -567,7 +567,7 @@ class MultipleProjectsPerMailingListTest(TestCase):
subject='[PATCH i-g-t] Subject') subject='[PATCH i-g-t] Subject')
parse_mail(email) parse_mail(email)
patch = Patch.objects.all()[0] patch = Patch.objects.all()[0]
self.assertEquals(patch.name, 'Subject') self.assertEqual(patch.name, 'Subject')
def testStripListemailTag(self): def testStripListemailTag(self):
self.project3.subject_prefix_tags = 'i-g-t' self.project3.subject_prefix_tags = 'i-g-t'
...@@ -577,7 +577,7 @@ class MultipleProjectsPerMailingListTest(TestCase): ...@@ -577,7 +577,7 @@ class MultipleProjectsPerMailingListTest(TestCase):
subject='[intel-gfx] [PATCH i-g-t] Subject') subject='[intel-gfx] [PATCH i-g-t] Subject')
parse_mail(email) parse_mail(email)
patch = Patch.objects.all()[0] patch = Patch.objects.all()[0]
self.assertEquals(patch.name, 'Subject') self.assertEqual(patch.name, 'Subject')
class MBoxPatchTest(PatchTest): class MBoxPatchTest(PatchTest):
...@@ -886,7 +886,7 @@ class InitialPatchStateTest(MailFromPatchTest): ...@@ -886,7 +886,7 @@ class InitialPatchStateTest(MailFromPatchTest):
class GitSendEmailTest(MailFromPatchTest): class GitSendEmailTest(MailFromPatchTest):
def _assertNPatches(self, n): def _assertNPatches(self, n):
self.assertEquals(Patch.objects.count(), n) self.assertEqual(Patch.objects.count(), n)
def testSettingOffGitSendEmail(self): def testSettingOffGitSendEmail(self):
"""git_send_email_only is false (default value) and email has been sent """git_send_email_only is false (default value) and email has been sent
...@@ -943,9 +943,9 @@ class GitSendEmailTest(MailFromPatchTest): ...@@ -943,9 +943,9 @@ class GitSendEmailTest(MailFromPatchTest):
content = find_content(self.p1, email) content = find_content(self.p1, email)
self.assertTrue(content.patch is not None) self.assertTrue(content.patch is not None)
self.assertEquals(content.patch.content, self.patch) self.assertEqual(content.patch.content, self.patch)
self.assertTrue(content.comment is not None) self.assertTrue(content.comment is not None)
self.assertEquals(content.comment.content, 'See attached patch!') self.assertEqual(content.comment.content, 'See attached patch!')
class ParseInitialTagsTest(PatchTest): class ParseInitialTagsTest(PatchTest):
......
...@@ -293,7 +293,7 @@ class APITest(APITestBase): ...@@ -293,7 +293,7 @@ class APITest(APITestBase):
response = self.client.get('/api/1.0' + response = self.client.get('/api/1.0' +
"/series/%s/revisions/1/cover/" % self.series3.pk) "/series/%s/revisions/1/cover/" % self.series3.pk)
self.assertEquals(response.status_code, 404) self.assertEqual(response.status_code, 404)
def _check_mbox_link(self, url, n): def _check_mbox_link(self, url, n):
response = self.client.get('/api/1.0' + url, {'link': 'Patchwork'}) response = self.client.get('/api/1.0' + url, {'link': 'Patchwork'})
...@@ -494,11 +494,11 @@ class MsgidsLookupTest(APITestBase): ...@@ -494,11 +494,11 @@ class MsgidsLookupTest(APITestBase):
response = self.get_json(self.msgid_url.format(self.patch.msgid)) response = self.get_json(self.msgid_url.format(self.patch.msgid))
results = response['results'] results = response['results']
self.assertEquals(response['count'], 1) # just one matching patch self.assertEqual(response['count'], 1) # just one matching patch
self.assertEquals(results[0]['patch_id'], self.patch.id) self.assertEqual(results[0]['patch_id'], self.patch.id)
self.assertEquals(results[0]['project_id'], self.patch.project_id) self.assertEqual(results[0]['project_id'], self.patch.project_id)
self.assertEquals(results[0]['series_id'], self.patch.series().id) self.assertEqual(results[0]['series_id'], self.patch.series().id)
self.assertEquals(results[0]['revision_ids'], [self.revision.version]) self.assertEqual(results[0]['revision_ids'], [self.revision.version])
def testUnbracketedLookup(self): def testUnbracketedLookup(self):
msgid = self.patch.msgid msgid = self.patch.msgid
...@@ -510,7 +510,7 @@ class MsgidsLookupTest(APITestBase): ...@@ -510,7 +510,7 @@ class MsgidsLookupTest(APITestBase):
response2 = self.get_json(self.msgid_url.format(stripped_msgid)) response2 = self.get_json(self.msgid_url.format(stripped_msgid))
self.assertTrue(response1['count'] != 0) self.assertTrue(response1['count'] != 0)
self.assertEquals(response1, response2) self.assertEqual(response1, response2)
def testSingleSeriesMultipleRevisionsLookup(self): def testSingleSeriesMultipleRevisionsLookup(self):
rev2 = self.revision.duplicate() rev2 = self.revision.duplicate()
...@@ -518,8 +518,8 @@ class MsgidsLookupTest(APITestBase): ...@@ -518,8 +518,8 @@ class MsgidsLookupTest(APITestBase):
response = self.get_json(self.msgid_url.format(self.patch.msgid)) response = self.get_json(self.msgid_url.format(self.patch.msgid))
results = response['results'] results = response['results']
self.assertEquals(response['count'], 1) # just one matching patch self.assertEqual(response['count'], 1) # just one matching patch
self.assertEquals(results[0]['revision_ids'], # multiple revs self.assertEqual(results[0]['revision_ids'], # multiple revs
[self.revision.version, rev2.version]) [self.revision.version, rev2.version])
def testMulitpleSeriesSingleRevisionsLookup(self): def testMulitpleSeriesSingleRevisionsLookup(self):
...@@ -536,17 +536,17 @@ class MsgidsLookupTest(APITestBase): ...@@ -536,17 +536,17 @@ class MsgidsLookupTest(APITestBase):
response = self.get_json(self.msgid_url.format(self.patch.msgid)) response = self.get_json(self.msgid_url.format(self.patch.msgid))
self.assertEquals(response['count'], 2) self.assertEqual(response['count'], 2)
def testCoverLetterLookup(self): def testCoverLetterLookup(self):
response = self.get_json(self.msgid_url.format(self.root_msgid)) response = self.get_json(self.msgid_url.format(self.root_msgid))
results = response['results'] results = response['results']
self.assertEquals(response['count'], 1) self.assertEqual(response['count'], 1)
self.assertTrue('patch_id' not in results[0].keys()) self.assertTrue('patch_id' not in results[0].keys())
self.assertEquals(results[0]['project_id'], self.series.project_id) self.assertEqual(results[0]['project_id'], self.series.project_id)
self.assertEquals(results[0]['series_id'], self.series.id) self.assertEqual(results[0]['series_id'], self.series.id)
self.assertEquals(results[0]['revision_ids'], [self.revision.version]) self.assertEqual(results[0]['revision_ids'], [self.revision.version])
class TestResultTest(APITestBase): class TestResultTest(APITestBase):
......
...@@ -56,34 +56,34 @@ class SeriesTest(TestCase): ...@@ -56,34 +56,34 @@ class SeriesTest(TestCase):
# make sure the series has been correctly populated # make sure the series has been correctly populated
series = Series.objects.all() series = Series.objects.all()
self.assertEquals(series.count(), 1) self.assertEqual(series.count(), 1)
s = series[0] s = series[0]
self.assertEquals(s.project, self.project) self.assertEqual(s.project, self.project)
self.assertEquals(s.name, self.series_name) self.assertEqual(s.name, self.series_name)
# same thing for the revision # same thing for the revision
revisions = SeriesRevision.objects.all() revisions = SeriesRevision.objects.all()
self.assertEquals(revisions.count(), 1) self.assertEqual(revisions.count(), 1)
r = revisions[0] r = revisions[0]
self.assertEquals(r.series_id, s.id) self.assertEqual(r.series_id, s.id)
self.assertEquals(r.root_msgid, self.root_msgid) self.assertEqual(r.root_msgid, self.root_msgid)
self.assertEquals(r.cover_letter, self.cover_letter) self.assertEqual(r.cover_letter, self.cover_letter)
# and list of patches # and list of patches
r_patches = r.patches.all() r_patches = r.patches.all()
self.assertEquals(r_patches.count(), self.n_patches) self.assertEqual(r_patches.count(), self.n_patches)
# Make sure we also insert patches. Most thorough checks on patches # Make sure we also insert patches. Most thorough checks on patches
# isn't the subject here. # isn't the subject here.
patches = Patch.objects.all() patches = Patch.objects.all()
self.assertEquals(patches.count(), self.n_patches) self.assertEqual(patches.count(), self.n_patches)
# We are inserting a single series, so the logs should only have one # We are inserting a single series, so the logs should only have one
# entry # entry
logs = EventLog.objects.all() logs = EventLog.objects.all()
self.assertEquals(logs.count(), 1) self.assertEqual(logs.count(), 1)
def check_revision_summary(self, revision, expected): def check_revision_summary(self, revision, expected):
self.assertIsNotNone(revision.state_summary) self.assertIsNotNone(revision.state_summary)
...@@ -91,7 +91,7 @@ class SeriesTest(TestCase): ...@@ -91,7 +91,7 @@ class SeriesTest(TestCase):
for entry in summary: for entry in summary:
state = entry['name'] state = entry['name']
count = entry['count'] count = entry['count']
self.assertEquals(expected[state], count) self.assertEqual(expected[state], count)
class GeneratedSeriesTest(SeriesTest): class GeneratedSeriesTest(SeriesTest):
...@@ -157,7 +157,7 @@ class RevisionStatus(GeneratedSeriesTest): ...@@ -157,7 +157,7 @@ class RevisionStatus(GeneratedSeriesTest):
event_count = EventLog.objects.all().count() event_count = EventLog.objects.all().count()
self.test_series.insert([extra]) self.test_series.insert([extra])
self.assertEquals(EventLog.objects.all().count(), event_count) self.assertEqual(EventLog.objects.all().count(), event_count)
def testSeriesWithWrongOrderingShouldBeCompleteAndStrange(self): def testSeriesWithWrongOrderingShouldBeCompleteAndStrange(self):
# replace patch 1/3 with a patch that is numbered 2/3 # replace patch 1/3 with a patch that is numbered 2/3
...@@ -197,9 +197,9 @@ class BasicGeneratedSeriesTests(GeneratedSeriesTest): ...@@ -197,9 +197,9 @@ class BasicGeneratedSeriesTests(GeneratedSeriesTest):
series = TestSeries(2) series = TestSeries(2)
series.insert() series.insert()
series = Series.objects.all()[0] series = Series.objects.all()[0]
self.assertEquals(str(series), defaults.series_name) self.assertEqual(str(series), defaults.series_name)
revision = series.revisions()[0] revision = series.revisions()[0]
self.assertEquals(str(revision), 'Revision 1') self.assertEqual(str(revision), 'Revision 1')
class SeriesViewTest(GeneratedSeriesTest): class SeriesViewTest(GeneratedSeriesTest):
...@@ -237,7 +237,7 @@ class Series0001(SingleMailSeries): ...@@ -237,7 +237,7 @@ class Series0001(SingleMailSeries):
# make sure we got the right patch inserted as well # make sure we got the right patch inserted as well
patches = Patch.objects.all() patches = Patch.objects.all()
patch = patches[0] patch = patches[0]
self.assertEquals(patch.msgid, self.root_msgid) self.assertEqual(patch.msgid, self.root_msgid)
class Series0010(IntelGfxTest): class Series0010(IntelGfxTest):
...@@ -328,15 +328,15 @@ http://lists.freedesktop.org/mailman/listinfo/intel-gfx ...@@ -328,15 +328,15 @@ http://lists.freedesktop.org/mailman/listinfo/intel-gfx
sr = SeriesRevision.objects.get() # we have just one sr = SeriesRevision.objects.get() # we have just one
stored_headers = HeaderParser().parsestr(sr.raw_cover_letter_headers) stored_headers = HeaderParser().parsestr(sr.raw_cover_letter_headers)
self.assertEquals(sr.raw_cover_letter, self.raw_cover_letter) self.assertEqual(sr.raw_cover_letter, self.raw_cover_letter)
self.assertEquals(stored_headers['From'], self.assertEqual(stored_headers['From'],
'Damien Lespiau <damien.lespiau@intel.com>') 'Damien Lespiau <damien.lespiau@intel.com>')
self.assertEquals(stored_headers['To'], self.assertEqual(stored_headers['To'],
'<intel-gfx@lists.freedesktop.org>') '<intel-gfx@lists.freedesktop.org>')
self.assertEquals(stored_headers['Date'], self.assertEqual(stored_headers['Date'],
'Tue, 13 May 2014 23:32:20 +0100') 'Tue, 13 May 2014 23:32:20 +0100')
self.assertEquals(stored_headers['Subject'], self.assertEqual(stored_headers['Subject'],
'[Intel-gfx] [PATCH 0/4] for_each_{intel_,}crtc v2') '[Intel-gfx] [PATCH 0/4] for_each_{intel_,}crtc v2')
...@@ -393,14 +393,14 @@ class ReferencesListTest(TestCase): ...@@ -393,14 +393,14 @@ class ReferencesListTest(TestCase):
series = TestSeries(1, has_cover_letter=False) series = TestSeries(1, has_cover_letter=False)
mails = series.create_mails() mails = series.create_mails()
refs = build_references_list(mails[0]) refs = build_references_list(mails[0])
self.assertEquals(refs, []) self.assertEqual(refs, [])
def testThread2Mails(self): def testThread2Mails(self):
series = TestSeries(1) series = TestSeries(1)
mails = series.create_mails() mails = series.create_mails()
refs = build_references_list(mails[1]) refs = build_references_list(mails[1])
self.assertEquals(len(refs), 1) self.assertEqual(len(refs), 1)
self.assertEquals(refs[0], mails[0].get('Message-Id')) self.assertEqual(refs[0], mails[0].get('Message-Id'))
def setMessageId(self, mail, msgid): def setMessageId(self, mail, msgid):
del mail['Message-Id'] del mail['Message-Id']
...@@ -443,7 +443,7 @@ class ReferencesListTest(TestCase): ...@@ -443,7 +443,7 @@ class ReferencesListTest(TestCase):
patch_v3 = series.create_patch(2, in_reply_to=reply_4, patch_v3 = series.create_patch(2, in_reply_to=reply_4,
subject_prefix="PATCH v3") subject_prefix="PATCH v3")
self.setMessageId(patch_v3, 'patch_2_3_v3') self.setMessageId(patch_v3, 'patch_2_3_v3')
self.assertEquals(build_references_list(patch_v3), self.assertEqual(build_references_list(patch_v3),
[reply_4.get('Message-Id'), [reply_4.get('Message-Id'),
patch_v2.get('Message-Id'), patch_v2.get('Message-Id'),
reply_3.get('Message-Id'), reply_3.get('Message-Id'),
...@@ -473,41 +473,41 @@ class UpdatedPatchTest(Series0030): ...@@ -473,41 +473,41 @@ class UpdatedPatchTest(Series0030):
def testNewRevision(self): def testNewRevision(self):
series = Series.objects.all()[0] series = Series.objects.all()[0]
self.assertEquals(series.last_revision.version, 2) self.assertEqual(series.last_revision.version, 2)
revisions = SeriesRevision.objects.all() revisions = SeriesRevision.objects.all()
self.assertEquals(revisions.count(), 2) self.assertEqual(revisions.count(), 2)
r = revisions[0] r = revisions[0]
self.assertEquals(r.series_id, series.id) self.assertEqual(r.series_id, series.id)
self.assertEquals(r.root_msgid, self.root_msgid) self.assertEqual(r.root_msgid, self.root_msgid)
self.assertEquals(r.patches.count(), 1) self.assertEqual(r.patches.count(), 1)
p = r.patches.all()[0] p = r.patches.all()[0]
self.assertEquals(p.msgid, self.root_msgid) self.assertEqual(p.msgid, self.root_msgid)
r = revisions[1] r = revisions[1]
self.assertEquals(r.series_id, series.id) self.assertEqual(r.series_id, series.id)
self.assertEquals(r.root_msgid, self.root_msgid) self.assertEqual(r.root_msgid, self.root_msgid)
self.assertEquals(r.patches.count(), 1) self.assertEqual(r.patches.count(), 1)
p = r.patches.all()[0] p = r.patches.all()[0]
self.assertEquals(p.msgid, self.assertEqual(p.msgid,
'<1427980954-15015-1-git-send-email-deepak.s@linux.intel.com>') '<1427980954-15015-1-git-send-email-deepak.s@linux.intel.com>')
class SinglePatchUpdateTest(GeneratedSeriesTest): class SinglePatchUpdateTest(GeneratedSeriesTest):
def check_revision(self, series, revision): def check_revision(self, series, revision):
self.assertEquals(revision.series_id, series.id) self.assertEqual(revision.series_id, series.id)
self.assertEquals(revision.root_msgid, self.root_msgid) self.assertEqual(revision.root_msgid, self.root_msgid)
self.assertEquals(revision.patches.count(), self.n_patches) self.assertEqual(revision.patches.count(), self.n_patches)
def check(self, original_mails, patch_v2_mail, n): def check(self, original_mails, patch_v2_mail, n):
self.assertEquals(Series.objects.count(), 1) self.assertEqual(Series.objects.count(), 1)
series = Series.objects.all()[0] series = Series.objects.all()[0]
self.assertEquals(series.last_revision.version, 2) self.assertEqual(series.last_revision.version, 2)
revisions = SeriesRevision.objects.all() revisions = SeriesRevision.objects.all()
self.assertEquals(revisions.count(), 2) self.assertEqual(revisions.count(), 2)
r = revisions[0] r = revisions[0]
self.check_revision(series, r) self.check_revision(series, r)
...@@ -516,13 +516,13 @@ class SinglePatchUpdateTest(GeneratedSeriesTest): ...@@ -516,13 +516,13 @@ class SinglePatchUpdateTest(GeneratedSeriesTest):
patch_mail = original_mails[n] patch_mail = original_mails[n]
else: else:
patch_mail = original_mails[n - 1] patch_mail = original_mails[n - 1]
self.assertEquals(p.msgid, patch_mail.get('Message-Id')) self.assertEqual(p.msgid, patch_mail.get('Message-Id'))
r = revisions[1] r = revisions[1]
self.check_revision(series, r) self.check_revision(series, r)
self.assertEquals(r.cover_letter, self.cover_letter) self.assertEqual(r.cover_letter, self.cover_letter)
p = r.ordered_patches()[n - 1] p = r.ordered_patches()[n - 1]
self.assertEquals(p.msgid, patch_v2_mail.get('Message-Id')) self.assertEqual(p.msgid, patch_v2_mail.get('Message-Id'))
def _test_internal(self, n_patches, n_updated, has_cover_letter=True): def _test_internal(self, n_patches, n_updated, has_cover_letter=True):
(test, mails) = self._create_series(n_patches, has_cover_letter) (test, mails) = self._create_series(n_patches, has_cover_letter)
...@@ -608,12 +608,12 @@ class SinglePatchUpdatesVariousCornerCasesTest(TestCase): ...@@ -608,12 +608,12 @@ class SinglePatchUpdatesVariousCornerCasesTest(TestCase):
mails.append(patch_v3) mails.append(patch_v3)
dummy.insert(mails) dummy.insert(mails)
self.assertEquals(Series.objects.count(), 1) self.assertEqual(Series.objects.count(), 1)
series = Series.objects.all()[0] series = Series.objects.all()[0]
self.assertEquals(series.last_revision.version, 3) self.assertEqual(series.last_revision.version, 3)
revisions = SeriesRevision.objects.all() revisions = SeriesRevision.objects.all()
self.assertEquals(revisions.count(), 3) self.assertEqual(revisions.count(), 3)
revision = revisions[0] revision = revisions[0]
patches = revision.ordered_patches() patches = revision.ordered_patches()
...@@ -645,12 +645,12 @@ class SinglePatchUpdatesVariousCornerCasesTest(TestCase): ...@@ -645,12 +645,12 @@ class SinglePatchUpdatesVariousCornerCasesTest(TestCase):
series.insert(mails) series.insert(mails)
self.assertEquals(Series.objects.count(), 1) self.assertEqual(Series.objects.count(), 1)
series = Series.objects.all()[0] series = Series.objects.all()[0]
self.assertEquals(series.last_revision.version, 2) self.assertEqual(series.last_revision.version, 2)
revisions = SeriesRevision.objects.all() revisions = SeriesRevision.objects.all()
self.assertEquals(revisions.count(), 2) self.assertEqual(revisions.count(), 2)
revision = revisions[0] revision = revisions[0]
patches = revision.ordered_patches() patches = revision.ordered_patches()
...@@ -725,33 +725,33 @@ class FullSeriesUpdateTest(GeneratedSeriesTest): ...@@ -725,33 +725,33 @@ class FullSeriesUpdateTest(GeneratedSeriesTest):
n_patches = len(mails) n_patches = len(mails)
if self.has_cover_letter: if self.has_cover_letter:
n_patches -= 1 n_patches -= 1
self.assertEquals(n_patches, ref_n_patches) self.assertEqual(n_patches, ref_n_patches)
self.assertEquals(revision.series_id, series.id) self.assertEqual(revision.<