diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-06-01 16:08:59 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-06-01 19:08:59 -0400 |
| commit | 2c69824e5ab5ddf4b9964c4cf9f9e16ff3bb7929 (patch) | |
| tree | 65b8e60b858e4f073a04c2bbf976b8f43fe0cff6 /tests/backends | |
| parent | edee5a8de6afb34a9247de2bb73ab66397a6e573 (diff) | |
Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.
Diffstat (limited to 'tests/backends')
| -rw-r--r-- | tests/backends/test_creation.py | 8 | ||||
| -rw-r--r-- | tests/backends/tests.py | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/backends/test_creation.py b/tests/backends/test_creation.py index 4b5d01ea2d..7a18a8d19b 100644 --- a/tests/backends/test_creation.py +++ b/tests/backends/test_creation.py @@ -91,19 +91,19 @@ class PostgreSQLDatabaseCreationTests(SimpleTestCase): self.assertEqual(suffix, expected) def test_sql_table_creation_suffix_with_none_settings(self): - settings = dict(CHARSET=None, TEMPLATE=None) + settings = {'CHARSET': None, 'TEMPLATE': None} self.check_sql_table_creation_suffix(settings, "") def test_sql_table_creation_suffix_with_encoding(self): - settings = dict(CHARSET='UTF8') + settings = {'CHARSET': 'UTF8'} self.check_sql_table_creation_suffix(settings, "WITH ENCODING 'UTF8'") def test_sql_table_creation_suffix_with_template(self): - settings = dict(TEMPLATE='template0') + settings = {'TEMPLATE': 'template0'} self.check_sql_table_creation_suffix(settings, 'WITH TEMPLATE "template0"') def test_sql_table_creation_suffix_with_encoding_and_template(self): - settings = dict(CHARSET='UTF8', TEMPLATE='template0') + settings = {'CHARSET': 'UTF8', 'TEMPLATE': 'template0'} self.check_sql_table_creation_suffix(settings, '''WITH ENCODING 'UTF8' TEMPLATE "template0"''') def _execute_raise_database_already_exists(self, cursor, parameters, keepdb=False): diff --git a/tests/backends/tests.py b/tests/backends/tests.py index 7a9981c0ac..5e7c6ae99c 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -970,9 +970,7 @@ class ThreadTests(TransactionTestCase): t.start() t.join() # Each created connection got different inner connection. - self.assertEqual( - len(set(conn.connection for conn in connections_dict.values())), - 3) + self.assertEqual(len({conn.connection for conn in connections_dict.values()}), 3) # Finish by closing the connections opened by the other threads (the # connection opened in the main thread will automatically be closed on # teardown). |
