зеркало из https://github.com/mozilla/FlightDeck.git
revision_pk key changed to package_key
This commit is contained in:
Родитель
903dbdecf2
Коммит
e00e2d06fa
|
@ -6,7 +6,7 @@ repackage.tests.test_views
|
|||
import commonware
|
||||
import os
|
||||
import simplejson
|
||||
import tempfile
|
||||
#import tempfile
|
||||
|
||||
from mock import Mock
|
||||
from nose.tools import eq_
|
||||
|
@ -15,7 +15,7 @@ from utils.test import TestCase
|
|||
from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from jetpack.models import SDK, PackageRevision
|
||||
from jetpack.models import SDK #, PackageRevision
|
||||
from repackage import tasks
|
||||
from jetpack.models import SDK
|
||||
|
||||
|
@ -141,6 +141,7 @@ class RepackageViewsTest(TestCase):
|
|||
'upload': f,
|
||||
'version': 'test-sdk-{sdk_version}',
|
||||
'secret': settings.AMO_SECRET_KEY})
|
||||
eq_(response.status_code, 200)
|
||||
task_args = tasks.low_rebuild.delay.call_args
|
||||
eq_(task_args[1]['package_overrides']['version'], 'test-sdk-1.0')
|
||||
|
||||
|
@ -162,6 +163,7 @@ class RepackageViewsTest(TestCase):
|
|||
'version': 'test-sdk-{sdk_version}',
|
||||
'secret': settings.AMO_SECRET_KEY,
|
||||
'sdk_version': SDKVERSION})
|
||||
eq_(response.status_code, 200)
|
||||
task_args = tasks.low_rebuild.delay.call_args
|
||||
eq_(task_args[0][2], sdk.get_source_dir())
|
||||
|
||||
|
@ -186,8 +188,8 @@ class RepackageViewsTest(TestCase):
|
|||
response = self.client.post(self.rebuild_url_addons, {
|
||||
'sdk_version': 'test_version',
|
||||
'addons': simplejson.dumps([
|
||||
{'revision_pk': 1},
|
||||
{'revision_pk': 2}]),
|
||||
{'package_key': 1},
|
||||
{'package_key': 2}]),
|
||||
'secret': settings.AMO_SECRET_KEY})
|
||||
|
||||
eq_(response.status_code, 200)
|
||||
|
|
|
@ -155,7 +155,7 @@ def rebuild_addons(request):
|
|||
error = True
|
||||
if not error:
|
||||
rebuild_task.delay(
|
||||
addon['revision_pk'], hashtag, sdk_version,
|
||||
addon['package_key'], hashtag, sdk_version,
|
||||
callback=tasks.rebuild_addon,
|
||||
package_overrides=package_overrides,
|
||||
pingback=pingback,
|
||||
|
|
|
@ -19,10 +19,11 @@ Fields:
|
|||
|
||||
**addons**
|
||||
JSON string - a list of dicts containing addons data.
|
||||
``[{"revision_pk": 1234, "version": "force.version", ... }]``.
|
||||
``[{"paclkage_key": 1234, "version": "force.version", ... }]``.
|
||||
All of the ``package.json`` may be overwritten.
|
||||
|
||||
**revision_pk** is the unique identifier of the PackageRevision in
|
||||
**paclkage_key** is the unique identifier of the
|
||||
:class:`~jetpack.models.PackageRevision` in
|
||||
the Builder
|
||||
|
||||
**version** (optional) is the way to force the version with which the
|
||||
|
|
Загрузка…
Ссылка в новой задаче