def test_serializer_invalid(self): self.data_set['linenos'] = 'A text instead of a bool' s = SnippetModelSerializer(data=self.data_set) self.assertFalse(s.is_valid())
def test_saving_data(self): s = SnippetModelSerializer(data=self.data_set) s.is_valid() s.save()
def test_serializer_is_valid(self): s = SnippetModelSerializer(data=self.data_set) self.assertTrue(s.is_valid())