HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
tests.test_drce_CommandConvertor.TestTaskExecuteStruct Class Reference
Inheritance diagram for tests.test_drce_CommandConvertor.TestTaskExecuteStruct:
Collaboration diagram for tests.test_drce_CommandConvertor.TestTaskExecuteStruct:

Public Member Functions

def teEst_json_encode (self)
 

Detailed Description

Definition at line 18 of file test_drce_CommandConvertor.py.

Member Function Documentation

◆ teEst_json_encode()

def tests.test_drce_CommandConvertor.TestTaskExecuteStruct.teEst_json_encode (   self)

Definition at line 21 of file test_drce_CommandConvertor.py.

21  def teEst_json_encode(self):
22  expect_json = """{"files": [{"action": 22, "data": "-f", "name": "go.py"}], "input": "", "session": {"tmode": 0, "shell": "", "environment": {}, "user": "", "timeout": 0, "password": "", "type": 0, "port": 0}, "command": ""}"""
23 
24  task_exec_struct = TaskExecuteStruct()
25  task_exec_struct.add_files("go.py", "-f", 22)
26  res_json = json.dumps(task_exec_struct, cls= TaskExecuteStructEncoder)
27 
28  self.assertEqual(expect_json, res_json, "json edcoder is broken")
29 
30 
31 

The documentation for this class was generated from the following file: