mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-20 16:41:03 +00:00
Save key pair when creating new User
This commit is contained in:
parent
a85043b351
commit
77a1fc26f1
2 changed files with 4 additions and 3 deletions
|
@ -199,6 +199,7 @@ def execute_after_save(sender, instance, created, *args, **kwargs):
|
|||
|
||||
instance.key_pair = KeyPair.objects.create(
|
||||
remote_id='%s/#main-key' % instance.remote_id)
|
||||
instance.save()
|
||||
|
||||
shelves = [{
|
||||
'name': 'To Read',
|
||||
|
|
|
@ -138,10 +138,10 @@ class Signature(TestCase):
|
|||
)
|
||||
|
||||
# Second and subsequent fetches get a different key:
|
||||
new_private_key, new_public_key = create_key_pair()
|
||||
key_pair = KeyPair(*create_key_pair())
|
||||
new_sender = Sender(
|
||||
self.fake_remote.remote_id, new_private_key, new_public_key)
|
||||
data['publicKey']['publicKeyPem'] = new_public_key
|
||||
self.fake_remote.remote_id, key_pair)
|
||||
data['publicKey']['publicKeyPem'] = key_pair.public_key
|
||||
responses.add(
|
||||
responses.GET,
|
||||
self.fake_remote.remote_id,
|
||||
|
|
Loading…
Reference in a new issue