def test_multiple_select_data(self): form = JSONTestForm({"json_data": ["SA", "WA"]}) assert form.is_valid() self.assertEqual(["SA", "WA"], form.cleaned_data["json_data"])
def test_multiple_select_data(self): form = JSONTestForm({'json_data': ['SA', 'WA']}) assert form.is_valid() self.assertEqual(['SA', 'WA'], form.cleaned_data['json_data'])
def test_form_clean(self): form = JSONTestForm({}) self.assertFalse(form.is_valid())