def test_empty_no_user(self): self.getuser_should_fail = True runner = InlineMRJobRunner(conf_paths=[]) match = JOB_NAME_RE.match(runner.get_job_name()) self.assertEqual(match.group(1), 'no_script') self.assertEqual(match.group(2), 'no_user')
def test_auto_owner(self): os.environ['USER'] = '******' runner = InlineMRJobRunner(conf_paths=[]) match = JOB_NAME_RE.match(runner.get_job_name()) self.assertEqual(match.group(1), 'no_script') self.assertEqual(match.group(2), 'mcp')
def test_owner_and_label_kwargs(self): runner = InlineMRJobRunner(conf_paths=[], owner='ads', label='ads_chain') match = JOB_NAME_RE.match(runner.get_job_name()) self.assertEqual(match.group(1), 'ads_chain') self.assertEqual(match.group(2), 'ads')
def test_auto_owner(self): os.environ["USER"] = "******" runner = InlineMRJobRunner(conf_paths=[]) match = JOB_NAME_RE.match(runner.get_job_name()) self.assertEqual(match.group(1), "no_script") self.assertEqual(match.group(2), "mcp")
def test_empty(self): runner = InlineMRJobRunner(conf_paths=[]) match = JOB_NAME_RE.match(runner.get_job_name()) self.assertEqual(match.group(1), 'no_script') self.assertEqual(match.group(2), getpass.getuser())