Exemple #1
0
def test_write_file(with_open):
    path = Mock()
    data = Mock()

    write_file(path, data)

    with_open.assert_called_once_with(path, "w")
    with_open().write.assert_called_once_with(data)
Exemple #2
0
def test_write_file_mode(with_open):
    path = Mock()
    data = Mock()
    mode = Mock()

    write_file(path, data, mode)

    with_open.assert_called_once_with(path, mode)
    with_open().write.assert_called_once_with(data)
def _create_model_server_config_file():
    configuration_properties = _generate_mms_config_properties()

    utils.write_file(MMS_CONFIG_FILE, configuration_properties)
def _create_torchserve_config_file():
    configuration_properties = _generate_ts_config_properties()

    utils.write_file(TS_CONFIG_FILE, configuration_properties)