mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Speed up tests (#638)
This commit is contained in:
@ -113,6 +113,8 @@ MIDDLEWARE = (
|
||||
"core.middleware.SignalRequestMiddleware",
|
||||
)
|
||||
|
||||
TEST_RUNNER = "sith.testrunner.SithTestRunner"
|
||||
|
||||
ROOT_URLCONF = "sith.urls"
|
||||
|
||||
TEMPLATES = [
|
||||
|
9
sith/testrunner.py
Normal file
9
sith/testrunner.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django.core.management import call_command
|
||||
from django.test.runner import DiscoverRunner
|
||||
|
||||
|
||||
class SithTestRunner(DiscoverRunner):
|
||||
def setup_databases(self, **kwargs):
|
||||
res = super().setup_databases(**kwargs)
|
||||
call_command("populate")
|
||||
return res
|
Reference in New Issue
Block a user