diff options
author | Andrew Godwin | 2022-11-20 23:07:57 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-20 23:08:09 -0700 |
commit | da936cd7df299d81b6c83d219ae54cf0075d88c7 (patch) | |
tree | 7d78945b43788493df761172599be86e81f48051 /users | |
parent | f20cd3eb15a00110706d065e2368c23472a42eb8 (diff) | |
download | takahe-da936cd7df299d81b6c83d219ae54cf0075d88c7.tar.gz takahe-da936cd7df299d81b6c83d219ae54cf0075d88c7.tar.bz2 takahe-da936cd7df299d81b6c83d219ae54cf0075d88c7.zip |
Don't try to make a keypair during tests
Diffstat (limited to 'users')
-rw-r--r-- | users/apps.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/users/apps.py b/users/apps.py index 05b5c3f..86a8eb3 100644 --- a/users/apps.py +++ b/users/apps.py @@ -1,4 +1,5 @@ from django.apps import AppConfig +from django.conf import settings class UsersConfig(AppConfig): @@ -6,7 +7,8 @@ class UsersConfig(AppConfig): name = "users" def ready(self) -> None: - # Generate the server actor keypair if needed - from users.models import SystemActor + if not settings.IN_TESTS: + # Generate the server actor keypair if needed + from users.models import SystemActor - SystemActor.generate_keys_if_needed() + SystemActor.generate_keys_if_needed() |