def test_get_environ_settings(self): job1 = BaseJob({}) self.assertEqual(job1.get_environ_settings(), set()) job2 = BaseJob({"environ": "a b c"}) self.assertEqual(job2.get_environ_settings(), set(["a", "b", "c"])) job3 = BaseJob({"environ": "a,b,c"}) self.assertEqual(job3.get_environ_settings(), set(["a", "b", "c"]))
def test_get_environ_settings(self): job1 = BaseJob({}) self.assertEqual(job1.get_environ_settings(), set()) job2 = BaseJob({'environ': 'a b c'}) self.assertEqual(job2.get_environ_settings(), set(['a', 'b', 'c'])) job3 = BaseJob({'environ': 'a,b,c'}) self.assertEqual(job3.get_environ_settings(), set(['a', 'b', 'c']))
def test_environ_parsing_with_various_separators(self): job = BaseJob({ 'name': 'name', 'plugin': 'plugin', 'environ': self.parameters_keymap[ self.parameters.glue].join(['foo', 'bar', 'froz'])}) expected = set({'foo', 'bar', 'froz'}) observed = job.get_environ_settings() self.assertEqual(expected, observed)
def test_environ_parsing_with_various_separators(self): job = BaseJob( { "id": "id", "plugin": "plugin", "environ": self.parameters_keymap[self.parameters.glue].join(["foo", "bar", "froz"]), } ) expected = set({"foo", "bar", "froz"}) observed = job.get_environ_settings() self.assertEqual(expected, observed)
def test_environ_parsing_with_various_separators(self): job = BaseJob({ 'id': 'id', 'plugin': 'plugin', 'environ': self.parameters_keymap[self.parameters.glue].join( ['foo', 'bar', 'froz']) }) expected = set({'foo', 'bar', 'froz'}) observed = job.get_environ_settings() self.assertEqual(expected, observed)
def test_environ_parsing_empty(self): job = BaseJob({'plugin': 'plugin'}) expected = set() observed = job.get_environ_settings() self.assertEqual(expected, observed)