From a0c0aa760de92089614522dc426fd0448aac927d Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 15 Apr 2021 14:28:34 +0200 Subject: [PATCH] Merge imports --- djangoldp_webpushnotification/tests/tests_vapidkeyset.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/djangoldp_webpushnotification/tests/tests_vapidkeyset.py b/djangoldp_webpushnotification/tests/tests_vapidkeyset.py index e8f217f..8fcefb9 100644 --- a/djangoldp_webpushnotification/tests/tests_vapidkeyset.py +++ b/djangoldp_webpushnotification/tests/tests_vapidkeyset.py @@ -1,15 +1,14 @@ from base64 import urlsafe_b64encode -import ecdsa from django.test import TestCase from djangoldp_webpushnotification.models import VAPIDKeyset -from ecdsa import SigningKey +from ecdsa import NIST256p, SigningKey class TestVAPIDKeySet(TestCase): def test_vapidkeyset_public_key(self): - priv_key = SigningKey.generate(curve=ecdsa.NIST256p) + priv_key = SigningKey.generate(curve=NIST256p) vapid_key_set = VAPIDKeyset.objects.create( - private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=") + private_key=urlsafe_b64encode(priv_key.to_string()).strip(b"=") ) assert isinstance(vapid_key_set.public_key, bytes)