Exemple #1
0
def test_add_job(schedule):
    """
    Tests adding a job to the schedule
    """
    data = {"foo": {"bar": "baz"}}
    ret = copy.deepcopy(schedule.opts)
    ret.update({
        "schedule": {
            "foo": {
                "bar": "baz",
                "enabled": True
            },
            "hello": {
                "world": "peace",
                "enabled": True
            },
        },
        "pillar": {},
    })
    schedule.opts.update({
        "schedule": {
            "hello": {
                "world": "peace",
                "enabled": True
            }
        },
        "pillar": {}
    })
    Schedule.add_job(schedule, data)
    assert schedule.opts == ret
Exemple #2
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': {'bar': 'baz'}}
     ret = copy.deepcopy(self.schedule.opts)
     ret.update({
         'schedule': {
             'foo': {
                 'bar': 'baz',
                 'enabled': True
             },
             'hello': {
                 'world': 'peace',
                 'enabled': True
             }
         },
         'pillar': {}
     })
     self.schedule.opts.update({
         'schedule': {
             'hello': {
                 'world': 'peace',
                 'enabled': True
             }
         },
         'pillar': {}
     })
     Schedule.add_job(self.schedule, data)
     self.assertEqual(self.schedule.opts, ret)
Exemple #3
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': {'bar': 'baz'}}
     ret = {
         'schedule': {
             'foo': {
                 'bar': 'baz',
                 'enabled': True
             },
             'hello': {
                 'world': 'peace',
                 'enabled': True
             }
         }
     }
     self.schedule.opts = {
         'schedule': {
             'hello': {
                 'world': 'peace',
                 'enabled': True
             }
         },
         'sock_dir': SOCK_DIR
     }
     Schedule.add_job(self.schedule, data)
     del self.schedule.opts['sock_dir']
     self.assertEqual(self.schedule.opts, ret)
Exemple #4
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': 'bar'}
     ret = {'schedule': {'foo': 'bar', 'hello': 'world'}}
     self.schedule.opts = {'schedule': {'hello': 'world'}}
     Schedule.add_job(self.schedule, data)
     self.assertEqual(self.schedule.opts, ret)
Exemple #5
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': 'bar'}
     ret = {'schedule': {'foo': 'bar', 'hello': 'world'}}
     self.schedule.opts = {'schedule': {'hello': 'world'}}
     Schedule.add_job(self.schedule, data)
     self.assertEqual(self.schedule.opts, ret)
Exemple #6
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': 'bar'}
     ret = {'schedule': {'foo': 'bar', 'hello': 'world'}}
     self.schedule.opts = {'schedule': {'hello': 'world'},
                           'sock_dir': SOCK_DIR}
     Schedule.add_job(self.schedule, data)
     del self.schedule.opts['sock_dir']
     self.assertEqual(self.schedule.opts, ret)
Exemple #7
0
 def test_add_job(self):
     '''
     Tests adding a job to the schedule
     '''
     data = {'foo': {'bar': 'baz'}}
     ret = copy.deepcopy(self.schedule.opts)
     ret.update({'schedule': {'foo': {'bar': 'baz', 'enabled': True},
                              'hello': {'world': 'peace', 'enabled': True}}})
     self.schedule.opts.update({'schedule': {'hello': {'world': 'peace', 'enabled': True}}})
     Schedule.add_job(self.schedule, data)
     self.assertEqual(self.schedule.opts, ret)