diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-05-24 00:04:27 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-05-24 09:04:27 +0200 |
| commit | 45edd746cc9d4eb0a3a1392f1256e4b9b179994c (patch) | |
| tree | 8601ef22b188f4843e7534cacd067f9640355c59 /tests | |
| parent | 58df8aa40fe88f753ba79e091a52f236246260b3 (diff) | |
Used re.Pattern.findall() instead of re.findall() in inspectdb.tests.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/inspectdb/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index 2dc65eb309..13a0d29107 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -215,7 +215,7 @@ class InspectDBTestCase(TestCase): call_command('inspectdb', 'inspectdb_uniquetogether', stdout=out) output = out.getvalue() self.assertIn(" unique_together = (('", output) - unique_together_match = re.findall(self.unique_re, output) + unique_together_match = self.unique_re.findall(output) # There should be one unique_together tuple. self.assertEqual(len(unique_together_match), 1) fields = unique_together_match[0] @@ -244,7 +244,7 @@ class InspectDBTestCase(TestCase): ) output = out.getvalue() self.assertIn('# A unique constraint could not be introspected.', output) - self.assertEqual(re.findall(self.unique_re, output), ["('id', 'people_unique')"]) + self.assertEqual(self.unique_re.findall(output), ["('id', 'people_unique')"]) finally: with connection.cursor() as c: c.execute('DROP INDEX Findex') |
