def test__get_key_dir(self):
        cfg_dir = '/gpg/cfg/dir'
        with patch.dict(gpg.__salt__, {'config.get': MagicMock(return_value=cfg_dir)}):
            self.assertEqual(gpg._get_key_dir(), cfg_dir)

        def_dir = '/etc/salt/gpgkeys'
        with patch.dict(gpg.__salt__, {'config.get': MagicMock(return_value=False)}):
            self.assertEqual(gpg._get_key_dir(), def_dir)
test _get_key_dir
dataset/ETHPy150Open saltstack/salt/tests/unit/renderers/gpg_test.py/GPGTestCase.test__get_key_dir