[PATCH v2 2/5] tests: Hardcode expected values
Daniel Axtens
dja at axtens.net
Sat Sep 22 01:29:20 AEST 2018
Also LGTM.
Reviewed-by: Daniel Axtens <dja at axtens.net>
Regards,
Daniel
Stephen Finucane <stephen at that.guru> writes:
> 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 6892a615..8b71fef1 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.series.first().name, cover_name)
>
> self._parse_mail(mbox[1])
> @@ -711,7 +707,7 @@ class SeriesNameTestCase(TestCase):
> self.assertEqual(patch.series.first().name, patch.name)
>
> cover = self._parse_mail(mbox[2])
> - self.assertEqual(cover.series.first().name, self._format_name(cover))
> + self.assertEqual(cover.series.first().name, 'A sample series')
>
> mbox.close()
>
> --
> 2.17.1
>
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork
More information about the Patchwork
mailing list