Пример #1
0
    def test_nacl_run(self):
        ret = py(tmpl('basic.py'), string=True)
        self.assertEqual(ret['result'], True)
        self.assertEqual(ret['data'], OrderedDict([
            ('/tmp', {
                'file.managed': [
                    {'group': 'root'},
                    {'mode': '1777'},
                    {'owner': 'root'}
                ]
            }),
        ]))

        self.assertEqual(default_registry.states, OrderedDict())
Пример #2
0
    def test_nacl_run(self):
        ret = py(tmpl('basic.py'), string=True)
        self.assertEqual(ret['result'], True)
        self.assertEqual(
            ret['data'],
            OrderedDict([
                ('/tmp', {
                    'file.managed': [{
                        'group': 'root'
                    }, {
                        'mode': '1777'
                    }, {
                        'owner': 'root'
                    }]
                }),
            ]))

        self.assertEqual(default_registry.states, OrderedDict())
Пример #3
0
 def _test():
     py(tmpl('invalid_function.py'), string=True)
Пример #4
0
 def _test():
     py(tmpl('invalid_function.py'), string=True)