<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> from salttesting . helpers import ensure_in_syspath <EOL> from salttesting . unit import skipIf <EOL> ensure_in_syspath ( '<STR_LIT>' ) <EOL> import integration <EOL> from salt . config import minion_config <EOL> from salt . loader import grains <EOL> class LoaderGrainsTest ( integration . ModuleCase ) : <EOL> '''<STR_LIT>''' <EOL> def setUp ( self ) : <EOL> self . opts = minion_config ( None ) <EOL> self . opts [ '<STR_LIT>' ] = [ '<STR_LIT>' ] <EOL> self . opts [ '<STR_LIT>' ] = grains ( self . opts ) <EOL> def test_grains_overwrite ( self ) : <EOL> grains = self . run_function ( '<STR_LIT>' ) <EOL> self . assertEqual ( { '<STR_LIT>' : '<STR_LIT>' } , grains [ '<STR_LIT>' ] ) <EOL> @ skipIf ( True , "<STR_LIT>" ) <EOL> class LoaderGrainsMergeTest ( integration . ModuleCase ) : <EOL> '''<STR_LIT>''' <EOL> def setUp ( self ) : <EOL> self . opts = minion_config ( None ) <EOL> self . opts [ '<STR_LIT>' ] = True <EOL> self . assertTrue ( self . opts [ '<STR_LIT>' ] ) <EOL> self . opts [ '<STR_LIT>' ] = [ '<STR_LIT>' ] <EOL> __grains__ = grains ( self . opts ) <EOL> def test_grains_merge ( self ) : <EOL> __grain__ = self . run_function ( '<STR_LIT>' , [ '<STR_LIT>' ] ) <EOL> self . assertIn ( '<STR_LIT>' , __grain__ ) <EOL> self . assertEqual ( { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } , __grain__ [ '<STR_LIT>' ] ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> from integration import run_tests <EOL> run_tests ( LoaderGrainsTest ) <EOL> run_tests ( LoaderGrainsMergeTest ) </s>
