'),
)
for pattern, output in tests:
self.assertEqual(simplify_regex(pattern), output)
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 567a8f14f8..84b44931b3 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -717,7 +717,7 @@ class ManageNoSettings(AdminScriptTestCase):
args = ['check', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "No module named '?(test_project\.)?settings'?", regex=True)
+ self.assertOutput(err, r"No module named '?(test_project\.)?settings'?", regex=True)
def test_builtin_with_bad_settings(self):
"no settings: manage.py builtin commands fail if settings file (from argument) doesn't exist"
@@ -950,7 +950,7 @@ class ManageAlternateSettings(AdminScriptTestCase):
args = ['check', 'admin_scripts']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "No module named '?(test_project\.)?settings'?", regex=True)
+ self.assertOutput(err, r"No module named '?(test_project\.)?settings'?", regex=True)
def test_builtin_with_settings(self):
"alternate: manage.py builtin commands work with settings provided as argument"
@@ -985,7 +985,7 @@ class ManageAlternateSettings(AdminScriptTestCase):
args = ['noargs_command']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, "No module named '?(test_project\.)?settings'?", regex=True)
+ self.assertOutput(err, r"No module named '?(test_project\.)?settings'?", regex=True)
def test_custom_command_with_settings(self):
"alternate: manage.py can execute user commands if settings are provided as argument"
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index fd8056513b..ef0e44029f 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -2289,7 +2289,7 @@ class AdminViewStringPrimaryKeyTest(TestCase):
cls.p1 = PrePopulatedPost.objects.create(title='A Long Title', published=True, slug='a-long-title')
cls.pk = (
"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 "
- """-_.!~*'() ;/?:@&=+$, <>#%" {}|\^[]`"""
+ r"""-_.!~*'() ;/?:@&=+$, <>#%" {}|\^[]`"""
)
cls.m1 = ModelWithStringPrimaryKey.objects.create(string_pk=cls.pk)
content_type_pk = ContentType.objects.get_for_model(ModelWithStringPrimaryKey).pk
@@ -4323,7 +4323,7 @@ class SeleniumTests(AdminSeleniumTestCase):
self.selenium.find_element_by_id('id_relatedprepopulated_set-2-1-pubdate').send_keys('1981-08-22')
self.get_select_option('#id_relatedprepopulated_set-2-1-status', 'option one').click()
self.selenium.find_element_by_id('id_relatedprepopulated_set-2-1-name').send_keys(
- 'a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters'
+ r'a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters'
)
slug1 = self.selenium.find_element_by_id('id_relatedprepopulated_set-2-1-slug1').get_attribute('value')
slug2 = self.selenium.find_element_by_id('id_relatedprepopulated_set-2-1-slug2').get_attribute('value')
@@ -4365,7 +4365,7 @@ class SeleniumTests(AdminSeleniumTestCase):
slug2='option-two-and-now-tabular-inline',
)
RelatedPrepopulated.objects.get(
- name='a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters',
+ name=r'a tÃbűlaŘ inline with ignored ;"&*^\%$#@-/`~ characters',
pubdate='1981-08-22',
status='option one',
slug1='tabular-inline-ignored-characters-1981-08-22',
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py
index baf4b8adc6..057771bfa4 100644
--- a/tests/admin_widgets/tests.py
+++ b/tests/admin_widgets/tests.py
@@ -419,7 +419,7 @@ class AdminFileWidgetTests(TestDataMixin, TestCase):
self.assertHTMLEqual(
w.render('test', self.album.cover_art),
'Currently: albums\hybrid_theory.jpg '
+ r'hybrid_theory.jpg">albums\hybrid_theory.jpg