Stop exposing {addon}.is_listed in the API

Consumers should look at the version channel instead since add-ons
will soon be able to have both listed and unlisted versions.

Fix #3922
This commit is contained in:
Mathieu Pillard 2016-11-21 12:21:44 +01:00
Родитель 5ca7242438
Коммит 7892a039c6
4 изменённых файлов: 0 добавлений и 18 удалений

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

@ -121,7 +121,6 @@ This endpoint allows you to fetch a specific add-on by id, slug or guid.
:>json string icon_url: The URL to icon for the add-on (including a cachebusting query string).
:>json boolean is_disabled: Whether the add-on is disabled or not.
:>json boolean is_experimental: Whether the add-on has been marked by the developer as experimental or not.
:>json boolean is_listed: Whether the add-on is listed or not.
:>json boolean is_source_public: Whether the add-on source is publicly viewable or not.
:>json string|object|null name: The add-on name (See :ref:`translated fields <api-overview-translations>`).
:>json string last_updated: The date of the last time the add-on was updated by its developer(s).

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

@ -185,7 +185,6 @@ class AddonSerializer(serializers.ModelSerializer):
'icon_url',
'is_disabled',
'is_experimental',
'is_listed',
'is_source_public',
'last_updated',
'name',
@ -342,7 +341,6 @@ class ESBaseAddonSerializer(BaseESSerializer):
'hotness',
'icon_type',
'is_experimental',
'is_listed',
'last_updated',
'modified',
'public_stats',

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

@ -158,7 +158,6 @@ class AddonSerializerOutputTestMixin(object):
assert result['icon_url'] == absolutify(self.addon.get_icon_url(64))
assert result['is_disabled'] == self.addon.is_disabled
assert result['is_experimental'] == self.addon.is_experimental is False
assert result['is_listed'] == self.addon.is_listed
assert result['is_source_public'] == self.addon.view_source
assert result['last_updated'] == (
self.addon.last_updated.replace(microsecond=0).isoformat() + 'Z')
@ -256,12 +255,6 @@ class AddonSerializerOutputTestMixin(object):
assert result['is_disabled'] is True
def test_is_listed(self):
self.addon = addon_factory(is_listed=False)
result = self.serialize()
assert result['is_listed'] is False
def test_is_source_public(self):
self.addon = addon_factory(view_source=True)
result = self.serialize()
@ -313,13 +306,6 @@ class AddonSerializerOutputTestMixin(object):
assert result['id'] == self.addon.pk
assert result['status'] == 'deleted'
def test_unlisted(self):
self.addon = addon_factory(name=u'My Unlisted Addôn', is_listed=False)
result = self.serialize()
assert result['id'] == self.addon.pk
assert result['is_listed'] == self.addon.is_listed
def test_has_policies(self):
self.addon = addon_factory()
self.addon.eula = {

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

@ -89,7 +89,6 @@ class TestInternalAddonSearchView(ESTestCase):
result = data['results'][0]
assert result['id'] == addon.pk
assert result['is_listed'] is False
assert result['status'] == 'public'
assert result['name'] == {'en-US': u'My Addôn'}
assert result['slug'] == 'my-addon'