Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Added developer info to mini-manifest (bug 821174)
Browse files Browse the repository at this point in the history
  • Loading branch information
robhudson committed Dec 17, 2012
1 parent 3aa23a8 commit 33764e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions mkt/reviewers/tests/test_views.py
Expand Up @@ -2027,6 +2027,7 @@ def test_reviewer(self):
eq_(res['Content-type'], 'application/x-web-app-manifest+json')
data = json.loads(res.content)
eq_(data['name'], self.app.name)
eq_(data['developer']['name'], 'Mozilla Labs')
eq_(data['package_path'], reverse('reviewers.signed',
args=[self.app.app_slug,
self.version.id]))
Expand Down
7 changes: 3 additions & 4 deletions mkt/reviewers/views.py
Expand Up @@ -578,10 +578,9 @@ def _mini_manifest(addon, version_id):
'package_path': absolutify(
reverse('reviewers.signed', args=[addon.app_slug, version.id]))
}
if 'icons' in manifest:
data['icons'] = manifest['icons']
if 'locales' in manifest:
data['locales'] = manifest['locales']
for key in ['developer', 'icons', 'locales']:
if key in manifest:
data[key] = manifest[key]

return json.dumps(data, cls=JSONEncoder)

Expand Down
7 changes: 3 additions & 4 deletions mkt/webapps/models.py
Expand Up @@ -657,10 +657,9 @@ def get_cached_manifest(self, force=False):
'release_notes': version.releasenotes,
'package_path': package_path,
}
if 'icons' in manifest:
data['icons'] = manifest['icons']
if 'locales' in manifest:
data['locales'] = manifest['locales']
for key in ['developer', 'icons', 'locales']:
if key in manifest:
data[key] = manifest[key]

data = json.dumps(data, cls=JSONEncoder)

Expand Down
1 change: 1 addition & 0 deletions mkt/webapps/tests/test_models.py
Expand Up @@ -470,6 +470,7 @@ def test_cached_manifest_contents(self):
eq_(data['package_path'], absolutify(
os.path.join(reverse('downloads.file', args=[file.id]),
file.filename)))
eq_(data['developer'], manifest['developer'])
eq_(data['icons'], manifest['icons'])
eq_(data['locales'], manifest['locales'])

Expand Down

0 comments on commit 33764e8

Please sign in to comment.