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']
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']