class_docstr: Test ModelToTriton
class_docstr_tok: ["Test","ModelToTriton"]
code: def test_status(self):
      name = "resnet18_conf2"
      server_config = {}
      node_config = NodeConfig(
          **{"name": name, "server": {"num_instances_per_device": 3}}
      )
      with TemporaryDirectory(dir="./") as root:
          path2 = Path(root)
          m = ModelToTriton(root, op, name, node_config, server_config)
          self.assertEqual(m.to_triton(), 0)
          self.assertFalse((path2 / name).exists())
  
      name = "resnet18_conf3"
      server_config = {"format_priority": ["tensorrt"]}
      node_config = NodeConfig(
          **{"name": name, "server": {"num_instances_per_device": 3}}
      )
      with TemporaryDirectory(dir="./") as root:
          path3 = Path(root)
          m = ModelToTriton(root, op, name, node_config, server_config)
          self.assertEqual(m.to_triton(), 0)
          self.assertFalse((path3 / name).exists())
  
      server_config = {"format_priority": ["onnx"]}
      op_tmp = Model()
      op_tmp.save_model = lambda x: False
      with TemporaryDirectory(dir="./") as root:
          path4 = Path(root)
          m = ModelToTriton(
              root, op_tmp, name, node_config, server_config
          )
          self.assertEqual(m.to_triton(), -1)
          self.assertTrue((path4 / name).exists())
  
file_path: towhee/tests/unittests/serve/triton/test_model_to_triton.py
imports: import unittest
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import torch
  import torchvision
  from towhee.runtime.node_config import NodeConfig
  from towhee.serve.triton.model_to_triton import ModelToTriton
label_desc: Use image node_id 3 for calling the TestModelToTriton obj's underlying member method code with example usage: obj.test_status() without return types