def METHOD_NAME(topo):
    """Specify a test case purpose or name here
    :id: 7902f37c-01d3-11ed-b65c-482ae39447e5
    :setup: Standalone Instance
    :steps:
        1. Generate the test script
        2. Run the test script
        3. Check that ldapsearch returned the namingcontext
    :expectedresults:
        1. No error
        2. No error and exit code should be 0
        3. namingcontext should be in the script output
    """
    inst=topo.standalone
    inst.enable_tls()
    with TemporaryDirectory() as dir:
        scriptname = f"{dir}/doit"
        scriptname = "/tmp/doit"
        d = {
            'dir': dir,
            'instname': inst.serverid,
            'url': f"ldaps://localhost:{inst.sslport}",
            'rootdn': DN_DM,
            'rootpw': PW_DM,
        }
        with open(scriptname, 'w') as f:
            f.write(script_content.format(**d))
        res = subprocess.run(('/bin/bash', scriptname), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf-8')
        assert res
        log.info(res.stdout)
        res.check_returncode()
        # If ldapsearch is successful then defaultnamingcontext should be in res.stdout
        assert "defaultnamingcontext" in res.stdout