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"])
Exemple #2
0
    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())
Exemple #4
0
 def test_form_clean(self):
     form = JSONTestForm({})
     self.assertFalse(form.is_valid())