              'email': 'foo@example.com',
              'password': '123'
          }
          serializer = self.Serializer(instance)
          self.assertEqual(serializer.data, {'email': 'foo@example.com'})
 
</s> remove         self.assertTrue(serializer.is_valid())
        self.assertEqual(serializer.validated_data, data)
 </s> add         assert serializer.is_valid()
        assert serializer.validated_data == data </s> remove         self.assertTrue(rs.is_valid())
 </s> add         assert rs.is_valid() </s> remove         self.assertFalse(rs.is_valid())
        self.assertEqual(rs.errors,
                         {'username': ['This field must be unique.']})
 </s> add         assert not rs.is_valid()
        assert rs.errors == {'username': ['This field must be unique.']} </s> remove         self.assertEqual(
            AnotherUniquenessModel._meta.get_field('code').validators, [])
 </s> add         assert AnotherUniquenessModel._meta.get_field('code').validators == [] </s> remove         self.assertEqual(
            AnotherUniquenessModel._meta.get_field('code').validators, [])
 </s> add         assert AnotherUniquenessModel._meta.get_field('code').validators == []
        assert serializer.data == {'email': 'foo@example.com'}
              'email': 'foo@example.com',
              'password': '123'
          }
          serializer = self.Serializer(instance)
        assert serializer.data == {'email': 'foo@example.com'}
keep keep keep keep replace
 converted validators and write_only_fields test to pytest style (#4697) 
tests/test_write_only_fields.py