Move /search/featured/ to /fireplace/search/featured/ (bug 875548)

This commit is contained in:
Allen Short 2013-06-20 13:21:30 -07:00
Родитель ccd14628b3
Коммит 292ba681a7
4 изменённых файлов: 8 добавлений и 15 удалений

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

@ -56,9 +56,9 @@ Search
:status 401: if attempting to filter by status, you do not have that role.
Featured App Listing
===================================
====================
.. http:get:: /api/v1/apps/search/featured/
.. http:get:: /api/v1/fireplace/search/featured/
**Request**

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

@ -17,11 +17,13 @@ api = Api(api_name='apps')
api.register(ValidationResource())
api.register(AppResource())
api.register(PreviewResource())
api.register(WithFeaturedResource())
api.register(SearchResource())
api.register(StatusResource())
api.register(RatingResource())
fireplace = Api(api_name='fireplace')
fireplace.register(WithFeaturedResource())
apps = SlugRouter()
apps.register(r'category', CategoryViewSet, base_name='app-category')
@ -41,6 +43,7 @@ if settings.ALLOW_TASTYPIE_SERVICES:
urlpatterns = patterns('',
url(r'^', include(api.urls)),
url(r'^', include(fireplace.urls)),
url(r'^apps/', include(apps.urls)),
url(r'^', include(stats_api.urls)),
url(r'^', include(services.urls))

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

@ -132,16 +132,6 @@ class SearchResource(CORSResource, MarketplaceResource):
return bundle
def override_urls(self):
return [
url(r'^(?P<resource_name>%s)/featured%s$' %
(self._meta.resource_name, trailing_slash()),
self.wrap_view('with_featured'), name='api_with_featured')
]
def with_featured(self, request, **kwargs):
return WithFeaturedResource().dispatch('list', request, **kwargs)
class WithFeaturedResource(SearchResource):

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

@ -487,7 +487,7 @@ class TestFeaturedNoCategories(BaseOAuth, ESTestCase):
list_url = list_url('search/featured')
def setUp(self):
super(TestFeaturedNoCategories, self).setUp()
super(TestFeaturedNoCategories, self).setUp(api_name='fireplace')
self.create_switch('search-api-es')
self.create_switch('buchets')
self.cat = Category.objects.create(type=amo.ADDON_WEBAPP, slug='shiny')
@ -554,7 +554,7 @@ class TestFeaturedWithCategories(BaseOAuth, ESTestCase):
list_url = list_url('search/featured')
def setUp(self):
super(TestFeaturedWithCategories, self).setUp()
super(TestFeaturedWithCategories, self).setUp(api_name='fireplace')
self.create_switch('search-api-es')
self.create_switch('buchets')
self.cat = Category.objects.create(type=amo.ADDON_WEBAPP, slug='shiny')