code: def test_defaults(monkeypatch, tmp_path):
      """Test if the default values are used when nothing user enters nothing."""
      config_path = str(tmp_path) + "/tmp_config.yaml"
      monkeypatch.setattr(
          orion.core, "DEF_CONFIG_FILES_PATHS", [config_path]
      )
      monkeypatch.setattr(builtins, "input", _mock_input(["", "", ""]))
  
      orion.core.cli.main(["db", "setup"])
  
      with open(config_path) as output:
          content = yaml.safe_load(output)
  
      assert content == {
          "database": {
              "type": "mongodb",
              "name": "orion",
              "host": "localhost",
          }
      }
  
file_path: orion/tests/functional/commands/test_setup_command.py
imports: import builtins
  import os
  import yaml
  import orion.core
  import orion.core.cli
  from orion.core.io.database import database_factory
label_desc: Use image node_id 5 for calling a global function with example usage: test_defaults(monkeypatch, tmp_path) without return types