Example #1
0
 def test_has_changed_empty(self):
     field = SimpleArrayField(forms.CharField())
     self.assertIs(field.has_changed(None, None), False)
     self.assertIs(field.has_changed(None, ''), False)
     self.assertIs(field.has_changed(None, []), False)
     self.assertIs(field.has_changed([], None), False)
     self.assertIs(field.has_changed([], ''), False)
Example #2
0
 def test_has_changed_empty(self):
     field = SimpleArrayField(forms.CharField())
     self.assertIs(field.has_changed(None, None), False)
     self.assertIs(field.has_changed(None, ''), False)
     self.assertIs(field.has_changed(None, []), False)
     self.assertIs(field.has_changed([], None), False)
     self.assertIs(field.has_changed([], ''), False)
Example #3
0
 def test_has_changed(self):
     field = SimpleArrayField(forms.IntegerField())
     self.assertIs(field.has_changed([1, 2], [1, 2]), False)
     self.assertIs(field.has_changed([1, 2], '1,2'), False)
     self.assertIs(field.has_changed([1, 2], '1,2,3'), True)
     self.assertIs(field.has_changed([1, 2], 'a,b'), True)
Example #4
0
 def test_has_changed(self):
     field = SimpleArrayField(forms.IntegerField())
     self.assertIs(field.has_changed([1, 2], [1, 2]), False)
     self.assertIs(field.has_changed([1, 2], '1,2'), False)
     self.assertIs(field.has_changed([1, 2], '1,2,3'), True)
     self.assertIs(field.has_changed([1, 2], 'a,b'), True)