mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
parent
865d4311e5
commit
d70e094183
42
tests/integration/loader/interfaces.py
Normal file
42
tests/integration/loader/interfaces.py
Normal file
@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
integration.loader.interfaces
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Test Salt's loader
|
||||
'''
|
||||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing libs
|
||||
from salttesting import TestCase
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
|
||||
import integration
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
# Import Salt libs
|
||||
import salt.ext.six as six
|
||||
from salt.config import minion_config
|
||||
|
||||
import salt.loader
|
||||
|
||||
# TODO: the rest of the public interfaces
|
||||
|
||||
|
||||
class raw_mod_Test(TestCase):
|
||||
'''
|
||||
Test the interface of raw_mod
|
||||
'''
|
||||
def test_basic(self):
|
||||
self.opts = minion_config(None)
|
||||
testmod = salt.loader.raw_mod(self.opts, 'test', None)
|
||||
for k, v in testmod.iteritems():
|
||||
self.assertEqual(k.split('.')[0], 'test')
|
||||
|
||||
def test_bad_name(self):
|
||||
self.opts = minion_config(None)
|
||||
testmod = salt.loader.raw_mod(self.opts, 'module_we_do_not_have', None)
|
||||
self.assertEqual(testmod, {})
|
Loading…
Reference in New Issue
Block a user