          """
          Test to ensure blank data in a field not marked as blank=True
          is considered invalid in a model serializer
          """
          serializer = self.not_blank_model_serializer_class(self.data)
          self.assertEquals(serializer.is_valid(), False)
 
</s> remove         serializer = self.serializer_class(data)
 </s> add         serializer = self.serializer_class(data=data) </s> remove         serializer = CommentSerializer(self.data, instance=self.comment)
 </s> add         serializer = CommentSerializer(self.comment, data=self.data) </s> remove         serializer = ManyToManySourceSerializer(instance=queryset)
 </s> add         serializer = ManyToManySourceSerializer(queryset)
        serializer = self.not_blank_model_serializer_class(data=self.data)
          """
          Test to ensure blank data in a field not marked as blank=True
          is considered invalid in a model serializer
          """
        serializer = self.not_blank_model_serializer_class(data=self.data)
          self.assertEquals(serializer.is_valid(), False)
keep keep keep keep replace keep
 Swap position of `instance` and `data` keyword arguments. 
rest_framework/tests/serializer.py