From da936cd7df299d81b6c83d219ae54cf0075d88c7 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 20 Nov 2022 23:07:57 -0700 Subject: Don't try to make a keypair during tests --- users/apps.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'users') 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() -- cgit v1.2.3