text: from teuthology.suite.placeholder import (
      substitute_placeholders, dict_templ, Placeholder
  )
  
  
  class TestPlaceholder(object):
      def test_substitute_placeholders(self):
          suite_hash = 'suite_hash'
          input_dict = dict(
              suite='suite',
              suite_branch='suite_branch',
              suite_hash=suite_hash,
              zbkc_branch='zbkc_branch',
              zbkc_hash='zbkc_hash',
              teuthology_branch='teuthology_branch',
              machine_type='machine_type',
              distro='distro',
              distro_version='distro_version',
              archive_upload='archive_upload',
              archive_upload_key='archive_upload_key',
              suite_repo='https://example.com/zbkc/suite.git',
              suite_relpath='',
              zbkc_repo='https://example.com/zbkc/zbkc.git',
          )
          output_dict = substitute_placeholders(dict_templ, input_dict)
          assert output_dict['suite'] == 'suite'
          assert output_dict['suite_sha1'] == suite_hash
          assert isinstance(dict_templ['suite'], Placeholder)
          assert isinstance(
              dict_templ['overrides']['admin_socket']['branch'],
              Placeholder)
  
      def test_null_placeholders_dropped(self):
          input_dict = dict(
              suite='suite',
              suite_branch='suite_branch',
              suite_hash='suite_hash',
              zbkc_branch='zbkc_branch',
              zbkc_hash='zbkc_hash',
              teuthology_branch='teuthology_branch',
              machine_type='machine_type',
              archive_upload='archive_upload',
              archive_upload_key='archive_upload_key',
              distro=None,
              distro_version=None,
              suite_repo='https://example.com/zbkc/suite.git',
              suite_relpath='',
              zbkc_repo='https://example.com/zbkc/zbkc.git',
          )
          output_dict = substitute_placeholders(dict_templ, input_dict)
          assert 'os_type' not in output_dict
  