mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 22:19:17 +02:00
Can now generate a key pair for the instance
This commit is contained in:
parent
707868d794
commit
588da6ff33
6 changed files with 101 additions and 0 deletions
14
api/tests/federation/test_commands.py
Normal file
14
api/tests/federation/test_commands.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from django.core.management import call_command
|
||||
|
||||
|
||||
def test_generate_instance_key_pair(preferences, mocker):
|
||||
mocker.patch(
|
||||
'funkwhale_api.federation.keys.get_key_pair',
|
||||
return_value=(b'private', b'public'))
|
||||
assert preferences['federation__public_key'] == ''
|
||||
assert preferences['federation__private_key'] == ''
|
||||
|
||||
call_command('generate_keys', interactive=False)
|
||||
|
||||
assert preferences['federation__private_key'] == 'private'
|
||||
assert preferences['federation__public_key'] == 'public'
|
Loading…
Add table
Add a link
Reference in a new issue