diff options
author | Nick Pope <nick@nickpope.me.uk> | 2022-01-28 20:15:53 +0000 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-31 12:30:13 +0100 |
commit | d3cb91db87b78629c0d2682630e90a048275179e (patch) | |
tree | 92476354cbb4df1bcff3cd1514a1bac6cbc98676 /tests/admin_inlines | |
parent | a320aab5129f4019b3c1d28b7a3b509582bc56f9 (diff) | |
download | django-d3cb91db87b78629c0d2682630e90a048275179e.tar.gz |
Used more augmented assignment statements.
Identified using the following command:
$ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
Diffstat (limited to 'tests/admin_inlines')
-rw-r--r-- | tests/admin_inlines/tests.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index ad7446e1ca..73f888d9d3 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -1908,11 +1908,9 @@ class SeleniumTests(AdminSeleniumTestCase): "border-top-%s", ] for prop in border_properties: - prop = prop % "width" - self.assertEqual(element.value_of_css_property(prop), width) + self.assertEqual(element.value_of_css_property(prop % "width"), width) for prop in border_properties: - prop = prop % "style" - self.assertEqual(element.value_of_css_property(prop), style) + self.assertEqual(element.value_of_css_property(prop % "style"), style) # Convert hex color to rgb. self.assertRegex(color, "#[0-9a-f]{6}") r, g, b = int(color[1:3], 16), int(color[3:5], 16), int(color[5:], 16) @@ -1923,8 +1921,7 @@ class SeleniumTests(AdminSeleniumTestCase): "rgba(%d, %d, %d, 1)" % (r, g, b), ] for prop in border_properties: - prop = prop % "color" - self.assertIn(element.value_of_css_property(prop), colors) + self.assertIn(element.value_of_css_property(prop % "color"), colors) def test_inline_formset_error_input_border(self): from selenium.webdriver.common.by import By |