IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 9 | 9 | from importlib import import_module |
| 10 | 10 | from io import StringIO |
| 11 | 11 | |
| | 12 | import django |
| 12 | 13 | from django.core.management import call_command |
| 13 | 14 | from django.db import connections |
| 14 | 15 | from django.test import SimpleTestCase, TestCase |
| … |
… |
|
| 308 | 309 | |
| 309 | 310 | global _worker_id |
| 310 | 311 | |
| | 312 | django.setup() |
| | 313 | |
| 311 | 314 | with counter.get_lock(): |
| 312 | 315 | counter.value += 1 |
| 313 | 316 | _worker_id = counter.value |
| … |
… |
|
| 319 | 322 | # reflected in django.db.connections. If the following line assigned |
| 320 | 323 | # connection.settings_dict = settings_dict, new threads would connect |
| 321 | 324 | # to the default database instead of the appropriate clone. |
| 322 | | connection.settings_dict.update(settings_dict) |
| | 325 | connection.settings_dict.update({ |
| | 326 | **settings_dict, |
| | 327 | 'NAME': connection.creation._get_test_db_name() |
| | 328 | }) |
| 323 | 329 | connection.close() |
| 324 | 330 | |
| 325 | 331 | |