diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-11-18 23:29:47 -0800 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-19 08:29:47 +0100 |
| commit | aa12cf07c9202e117712abe2621d901dd6dd94b4 (patch) | |
| tree | 86f2cda8929755fcd8d1c27085c87946b9774150 /tests | |
| parent | 5cef2cd4a10e51035e2728e3e5e59265bc0347e0 (diff) | |
Removed unnecessary numeric indexes in format strings.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/admin_widgets/tests.py | 2 | ||||
| -rw-r--r-- | tests/db_functions/models.py | 2 | ||||
| -rw-r--r-- | tests/gis_tests/gdal_tests/test_raster.py | 2 | ||||
| -rw-r--r-- | tests/template_tests/templatetags/custom.py | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 7aa597a87d..2bbf176ec3 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -883,7 +883,7 @@ class DateTimePickerSeleniumTests(AdminWidgetSeleniumTestCase): # Get the expected caption may_translation = month_name - expected_caption = '{0:s} {1:d}'.format(may_translation.upper(), 1984) + expected_caption = '{:s} {:d}'.format(may_translation.upper(), 1984) # Test with every locale with override_settings(LANGUAGE_CODE=language_code, USE_L10N=True): diff --git a/tests/db_functions/models.py b/tests/db_functions/models.py index 083655e80f..0deea8f54c 100644 --- a/tests/db_functions/models.py +++ b/tests/db_functions/models.py @@ -49,7 +49,7 @@ class DTModel(models.Model): duration = models.DurationField(null=True, blank=True) def __str__(self): - return 'DTModel({0})'.format(self.name) + return 'DTModel({})'.format(self.name) class DecimalModel(models.Model): diff --git a/tests/gis_tests/gdal_tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py index a8801e88dd..f3477181b4 100644 --- a/tests/gis_tests/gdal_tests/test_raster.py +++ b/tests/gis_tests/gdal_tests/test_raster.py @@ -319,7 +319,7 @@ class GDALRasterTests(SimpleTestCase): return gdalinfo = """ Driver: GTiff/GeoTIFF - Files: {0} + Files: {} Size is 163, 174 Coordinate System is: PROJCS["NAD83 / Florida GDL Albers", diff --git a/tests/template_tests/templatetags/custom.py b/tests/template_tests/templatetags/custom.py index eaaff193ee..a5e1b33c67 100644 --- a/tests/template_tests/templatetags/custom.py +++ b/tests/template_tests/templatetags/custom.py @@ -153,13 +153,13 @@ simple_tag_without_context_parameter.anything = "Expected simple_tag_without_con @register.simple_tag(takes_context=True) def escape_naive(context): """A tag that doesn't even think about escaping issues""" - return "Hello {0}!".format(context['name']) + return "Hello {}!".format(context['name']) @register.simple_tag(takes_context=True) def escape_explicit(context): """A tag that uses escape explicitly""" - return escape("Hello {0}!".format(context['name'])) + return escape("Hello {}!".format(context['name'])) @register.simple_tag(takes_context=True) |
