Fix get_signature_serial_number renaming

This commit is contained in:
Christopher Grebs 2017-07-13 19:30:44 +02:00
Родитель bfcedf0869
Коммит 66be8614b7
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -11,7 +11,7 @@ from django.core.files.storage import default_storage as storage
import requests
from django_statsd.clients import statsd
from signing_clients.apps import get_signature_serial_number, JarExtractor
from signing_clients.apps import get_signer_serial_number, JarExtractor
import olympia.core.logger
from olympia import amo
@ -93,7 +93,7 @@ def call_signing(file_obj, endpoint):
raise SigningError(msg)
pkcs7 = b64decode(json.loads(response.content)['mozilla.rsa'])
cert_serial_num = get_signature_serial_number(pkcs7)
cert_serial_num = get_signer_serial_number(pkcs7)
jar.make_signed(pkcs7, sigpath=u'mozilla')
shutil.move(temp_filename, file_obj.file_path)
return cert_serial_num

Просмотреть файл

@ -63,10 +63,10 @@ class TestPackaged(TestCase):
monkeypatch.setattr('requests.post', mock_post_call)
@pytest.fixture(autouse=True)
def mock_get_signature_serial_number(self, monkeypatch):
def mock_get_signer_serial_number(self, monkeypatch):
"""Fake a standard signing-client response."""
monkeypatch.setattr(
'olympia.lib.crypto.packaged.get_signature_serial_number',
'olympia.lib.crypto.packaged.get_signer_serial_number',
lambda pkcs7: 'serial number')
def assert_not_signed(self):