Esempio n. 1
0
 def test_get_environ_settings(self):
     job1 = JobDefinition({})
     self.assertEqual(job1.get_environ_settings(), set())
     job2 = JobDefinition({'environ': 'a b c'})
     self.assertEqual(job2.get_environ_settings(), set(['a', 'b', 'c']))
     job3 = JobDefinition({'environ': 'a,b,c'})
     self.assertEqual(job3.get_environ_settings(), set(['a', 'b', 'c']))
Esempio n. 2
0
 def test_environ_parsing_empty(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin'})
     expected = set()
     observed = job.get_environ_settings()
     self.assertEqual(expected, observed)
Esempio n. 3
0
 def test_environ_parsing_single_word(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin',
         'environ': 'word'})
     expected = set(['word'])
     observed = job.get_environ_settings()
     self.assertEqual(expected, observed)
Esempio n. 4
0
 def test_environ_parsing_with_various_separators(self):
     job = JobDefinition({
         '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)