mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 08:39:24 +02:00
Fix #648: Improved test suite speed by reducing / disabling expensive operations
This commit is contained in:
parent
17cb09fdc6
commit
7657db4212
8 changed files with 32 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
|||
import re
|
||||
import urllib.parse
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from cryptography.hazmat.backends import default_backend as crypto_default_backend
|
||||
from cryptography.hazmat.primitives import serialization as crypto_serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
@ -8,7 +10,8 @@ from cryptography.hazmat.primitives.asymmetric import rsa
|
|||
KEY_ID_REGEX = re.compile(r"keyId=\"(?P<id>.*)\"")
|
||||
|
||||
|
||||
def get_key_pair(size=2048):
|
||||
def get_key_pair(size=None):
|
||||
size = size or settings.RSA_KEY_SIZE
|
||||
key = rsa.generate_private_key(
|
||||
backend=crypto_default_backend(), public_exponent=65537, key_size=size
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue