Example #1
0
 def test_resource_parsing_empty(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin'})
     expected = set()
     observed = job.get_resource_dependencies()
     self.assertEqual(expected, observed)
Example #2
0
 def test_resource_parsing_typical(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin',
         'requires': 'foo.bar == 10'})
     expected = set(['foo'])
     observed = job.get_resource_dependencies()
     self.assertEqual(expected, observed)
Example #3
0
 def test_resource_parsing_many(self):
     job = JobDefinition({
         'id': 'id',
         'plugin': 'plugin',
         'requires': (
             "foo.bar == 10\n"
             "froz.bot == 10\n")})
     expected = set(['foo', 'froz'])
     observed = job.get_resource_dependencies()
     self.assertEqual(expected, observed)