Fix build broken in c030931:
* Update Webapp.featured to return a set of Webapp instances, rather than a QuerySet of their FeaturedApp instances. * Fix incorrect use of the eq_ shortcut in TestFeaturedAppQueryset.test_queryset_featured
This commit is contained in:
Родитель
c030931537
Коммит
db9a573198
|
@ -525,7 +525,8 @@ class Webapp(Addon):
|
|||
@classmethod
|
||||
def featured(cls, cat=None, region=None, limit=6, mobile=False,
|
||||
gaia=False):
|
||||
return FeaturedApp.objects.featured(cat, region, limit, mobile, gaia)
|
||||
qs = FeaturedApp.objects.featured(cat, region, limit, mobile, gaia)
|
||||
return [w.app for w in qs]
|
||||
|
||||
@classmethod
|
||||
def get_excluded_in(cls, region):
|
||||
|
|
|
@ -444,7 +444,7 @@ class TestFeaturedAppQueryset(amo.tests.TestCase):
|
|||
FeaturedApp.objects.featured()
|
||||
), 'Inactive items in featured queryset'
|
||||
limited = FeaturedApp.objects.featured(limit=1).count()
|
||||
assert eq_(limited, 1), '%s items returned, only 1 expected' % limited
|
||||
eq_(limited, 1, '%s items returned, only 1 expected' % limited)
|
||||
|
||||
|
||||
class TestAddonSearch(amo.tests.ESTestCase):
|
||||
|
|
Загрузка…
Ссылка в новой задаче