コード例 #1
0
 def test_no_possible_categories(self):
     Category.objects.create(type=amo.ADDON_SEARCH,
                             application=amo.FIREFOX.id)
     addon = addon_factory(type=amo.ADDON_SEARCH)
     request = req_factory_factory('/')
     form = forms.CategoryFormSet(addon=addon, request=request)
     apps = [f.app for f in form.forms]
     assert apps == [amo.FIREFOX]
コード例 #2
0
ファイル: test_forms.py プロジェクト: Mitrajit/addons-server
 def test_no_possible_categories(self):
     addon = addon_factory(type=amo.ADDON_DICT)
     request = req_factory_factory('/')
     form = forms.CategoryFormSet(addon=addon, request=request)
     apps = [f.app for f in form.forms]
     assert apps == [amo.FIREFOX]