(self, *fixture_labels, **options)
| 36 | ) |
| 37 | |
| 38 | def handle(self, *fixture_labels, **options): |
| 39 | verbosity = options["verbosity"] |
| 40 | interactive = options["interactive"] |
| 41 | |
| 42 | # Create a test database. |
| 43 | db_name = connection.creation.create_test_db( |
| 44 | verbosity=verbosity, autoclobber=not interactive |
| 45 | ) |
| 46 | |
| 47 | # Import the fixture data into the test database. |
| 48 | call_command("loaddata", *fixture_labels, verbosity=verbosity) |
| 49 | |
| 50 | # Run the development server. Turn off auto-reloading because it causes |
| 51 | # a strange error -- it causes this handle() method to be called |
| 52 | # multiple times. |
| 53 | shutdown_message = ( |
| 54 | "\nServer stopped.\nNote that the test database, %r, has not been " |
| 55 | "deleted. You can explore it on your own." % db_name |
| 56 | ) |
| 57 | use_threading = connection.features.test_db_allows_multiple_connections |
| 58 | call_command( |
| 59 | "runserver", |
| 60 | addrport=options["addrport"], |
| 61 | shutdown_message=shutdown_message, |
| 62 | use_reloader=False, |
| 63 | use_ipv6=options["use_ipv6"], |
| 64 | use_threading=use_threading, |
| 65 | ) |
nothing calls this directly
no test coverage detected