Beispiel #1
0
 def test_discovery_module_form_dedupe(self):
     data = {
         'app': amo.FIREFOX.id,
         'module': 'xx',
         'locales': 'en-US he he fa fa'
     }
     form = DiscoveryModuleForm(data)
     assert form.is_valid()
     cleaned_locales = form.cleaned_data['locales'].split()
     assert sorted(cleaned_locales) == ['en-US', 'fa', 'he']
Beispiel #2
0
 def test_discovery_module_form_dedupe(self):
     data = {
         'app': amo.FIREFOX.id,
         'module': 'xx',
         'locales': 'en-US he he fa fa'
     }
     form = DiscoveryModuleForm(data)
     assert form.is_valid()
     cleaned_locales = form.cleaned_data['locales'].split()
     assert sorted(cleaned_locales) == ['en-US', 'fa', 'he']
Beispiel #3
0
 def test_discovery_module_form_dedupe(self):
     d = dict(app=amo.FIREFOX.id, module='xx', locales='en-US he he fa fa')
     form = DiscoveryModuleForm(d)
     assert form.is_valid()
     cleaned_locales = form.cleaned_data['locales'].split()
     assert sorted(cleaned_locales) == ['en-US', 'fa', 'he']
Beispiel #4
0
 def test_discovery_module_form_dedupe(self):
     d = dict(app=amo.FIREFOX.id, module='xx', locales='en-US he he fa fa')
     form = DiscoveryModuleForm(d)
     assert form.is_valid()
     cleaned_locales = form.cleaned_data['locales'].split()
     assert sorted(cleaned_locales) == ['en-US', 'fa', 'he']