ivandasch commented on a change in pull request #6:
URL: 
https://github.com/apache/ignite-python-thin-client/pull/6#discussion_r568506407



##########
File path: tests/test_binary.py
##########
@@ -355,3 +360,98 @@ class TestObject(
     hash_utf8 = BinaryObject.hashcode(obj_utf8, client=client)
 
     assert hash_utf8 == -1945378474, 'Invalid hashcode value for object with 
UTF-8 strings'
+
+
+def test_complex_object_null_fields(client):
+    """
+    Test that Python client can correctly write and read binary object that
+    contains null fields.
+    """
+    class AllTypesObject(
+        metaclass=GenericObjectMeta,
+        type_name='TestObject',
+        schema=OrderedDict([

Review comment:
       too many repeats.
   ```
   
   def camel_to_snake(name):
        name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()
   
   fields = [(camel_to_snake(type_.__name__, type_) for type_  in 
[ByteObject,... ]]
   
   class AllTypesObject(schema=OrderedDict(fields)):
         pass
    
   for field,_ in fields:
      setattr(obj, field, None) 
   
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to