def test_update_edge_mapping(self):
     """
     更新边映射
     """
     self.test_add_edge_mapping()
     graph_id, job_id, file_id, edge_id = ID.get_edgeMapping_id()
     # 发行于
     edge_issue = {
         "label": "发行于",
         "source_fields": ["名称"],
         "target_fields": ["发行时间"],
         "field_mapping": [],
         "value_mapping": [],
         "null_values": {
             "checked": ["NULL", "null"],
             "customized": ["EMPTY"]
         }
     }
     code, res = Mapping.update_edge_mapping(body=edge_issue, graph_id=graph_id, job_id=job_id, file_id=file_id,
                                             edge_id=edge_id)
     self.assertEqual(code, 200, "响应状态码不正确")
     self.assertEqual(res['status'], 200, "修改边映射状态码不正确")
     self.assertEqual(res['data']['edge_mappings'][0]['label'], edge_issue['label'], "修改边映射有误")
     self.assertEqual(res['data']['edge_mappings'][0]['null_values']['customized'],
                      edge_issue['null_values']['customized'], "边映射空值列表修改有误")
 def test_delete_edge_mapping(self):
     """
     删除单个边映射
     """
     self.test_add_edge_mapping()
     graph_id, job_id, file_id, edge_id = ID.get_edgeMapping_id()
     code, res = Mapping.delete_edge_mapping(graph_id=graph_id, job_id=job_id, file_id=file_id, edge_id=edge_id)
     self.assertEqual(code, 200, "响应状态码不正确")
     self.assertEqual(res['status'], 200, "删除边映射状态码不正确")