[PATCH 2/6] tests: Hardcode expected values
Stephen Finucane
stephen at that.guru
Fri Sep 7 07:14:02 AEST 2018
Compare against known values to ensure bugs introduced in the function
are caught.
Signed-off-by: Stephen Finucane <stephen at that.guru>
---
patchwork/tests/test_series.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/patchwork/tests/test_series.py b/patchwork/tests/test_series.py
index 9b5c0129..cdebf254 100644
--- a/patchwork/tests/test_series.py
+++ b/patchwork/tests/test_series.py
@@ -637,10 +637,6 @@ class SeriesNameTestCase(TestCase):
def _parse_mail(self, mail):
return parser.parse_mail(mail, self.project.listid)
- @staticmethod
- def _format_name(cover):
- return models.Series._format_name(cover)
-
def test_cover_letter(self):
"""Cover letter name set as series name.
@@ -656,7 +652,7 @@ class SeriesNameTestCase(TestCase):
mbox = self._get_mbox('base-cover-letter.mbox')
cover = self._parse_mail(mbox[0])
- cover_name = self._format_name(cover)
+ cover_name = 'A sample series'
self.assertEqual(cover.latest_series.name, cover_name)
self._parse_mail(mbox[1])
@@ -711,7 +707,7 @@ class SeriesNameTestCase(TestCase):
self.assertEqual(patch.latest_series.name, patch.name)
cover = self._parse_mail(mbox[2])
- self.assertEqual(cover.latest_series.name, self._format_name(cover))
+ self.assertEqual(cover.latest_series.name, 'A sample series')
mbox.close()
--
2.17.1
More information about the Patchwork
mailing list