Document how the addon param can be a slug too (#5750)

This commit is contained in:
Kumar McMillan 2017-06-22 17:51:05 -05:00 коммит произвёл GitHub
Родитель df9d686cb2
Коммит 80a33c1579
2 изменённых файлов: 3 добавлений и 3 удалений

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

@ -25,7 +25,7 @@ user has already posted a review for the current version of an add-on.
.. http:get:: /api/v3/reviews/review/
:query string addon: The add-on id to fetch reviews from. When passed, the reviews shown will always be the latest posted by each user on this particular add-on (which means there should only be one review per user in the results), unless the ``version`` parameter is also passed.
:query string addon: The :ref:`add-on <addon-detail>` id, slug, or guid to fetch reviews from. When passed, the reviews shown will always be the latest posted by each user on this particular add-on (which means there should only be one review per user in the results), unless the ``version`` parameter is also passed.
:query string filter: The :ref:`filter(s) <review-filtering-param>` to apply.
:query string user: The user id to fetch reviews from.
:query boolean show_grouped_ratings: Whether or not to show ratings aggregates for this add-on in the response (Use "true"/"1" as truthy values, "0"/"false" as falsy ones).

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

@ -858,10 +858,10 @@ class TestReviewViewSetGet(TestCase):
assert 'grouped_ratings' not in data
def test_list_addon_guid(self):
self.test_list_addon(addon_pk=self.addon.guid)
self.test_list_addon(addon=self.addon.guid)
def test_list_addon_slug(self):
self.test_list_addon(addon_pk=self.addon.slug)
self.test_list_addon(addon=self.addon.slug)
def test_list_with_empty_reviews(self):
def create_review(body='review text', user=None):