mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Used re.Pattern.findall() instead of re.findall() in inspectdb.tests.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							58df8aa40f
						
					
				
				
					commit
					45edd746cc
				
			| @@ -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') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user