From f795e571d2e2d30ab28698d6fab2514f6c0495b7 Mon Sep 17 00:00:00 2001 From: Michael Milton Date: Mon, 20 Nov 2017 11:20:39 +1100 Subject: [PATCH] Stop using deprecated assert methods --- test/test_column.py | 2 +- test/test_validation_warning.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_column.py b/test/test_column.py index 1815345..38e61f0 100644 --- a/test/test_column.py +++ b/test/test_column.py @@ -49,7 +49,7 @@ def test_outputs(self): self.assertEqual(len(results), 2 * len(self.ser), 'A Column produces the wrong number of errors') for i in range(2): in_row = [r for r in results if r.row == i] - self.assertEquals(len(in_row), 2, 'A Column does not report both errors for every row') + self.assertEqual(len(in_row), 2, 'A Column does not report both errors for every row') class AllowEmptyColumn(unittest.TestCase): diff --git a/test/test_validation_warning.py b/test/test_validation_warning.py index 255dad1..cd0cd70 100644 --- a/test/test_validation_warning.py +++ b/test/test_validation_warning.py @@ -13,9 +13,9 @@ def test_shows_row_col(self): """ v = ValidationWarning(self.MESSAGE, '', 0, '') vs = str(v) - self.assertRegexpMatches(vs, 'row') - self.assertRegexpMatches(vs, self.MESSAGE) - self.assertRegexpMatches(vs, 'column') + self.assertRegex(vs, 'row') + self.assertRegex(vs, self.MESSAGE) + self.assertRegex(vs, 'column') def test_no_row_col(self): """