def METHOD_NAME(self):
    """
    Test permission flag of resources of a single node job
    using a execjob_begin hook.
    """
    self.logger.info("test_custom_resc__single_node")
    a = {'Resource_List.foo_str': 'str_noperm',
         'Resource_List.foo_strm': 'str_perm',
         'Resource_List.foo_strh': 'str_hook'
         }
    j = Job(TEST_USER, a)
    j.set_sleep_time("100")
    jid = self.server.submit(j)
    self.server.expect(JOB, {
        'job_state': 'R',
        'Resource_List.foo_str': 'str_noperm',
        'Resource_List.foo_strm': 'str_perm',
        'Resource_List.foo_strh': 'str_hook'},
        offset=1, id=jid)
    # Match mom logs entry, only resoruces with "m" flag would show up.
    msg = 'foo_strm=str_perm'
    self.momA.log_match("Job;%s;.*%s.*" % (jid, msg),
                        regexp=True, n=10, max_attempts=10, interval=2)
    msg = 'foo_strh=str_hook'
    self.momA.log_match("Job;%s;.*%s.*" % (jid, msg),
                        regexp=True, n=10, max_attempts=10, interval=2)
    msg = 'foo_str=str_noperm'
    self.momA.log_match("Job;%s;.*%s.*" % (jid, msg),
                        regexp=True, n=5, max_attempts=10, interval=2,
                        existence=False)