def testGetExternalPem(self):
    self.mox.StubOutWithMock(self.settings, '_GetExternalConfiguration')

    path = os.path.join(self.settings._path, 'ssl')

    self.settings._GetExternalConfiguration(
        'new.pem', as_file=True, path=path).AndReturn('new')

    self.settings._settings['predefined'] = 'pre'

    self.mox.ReplayAll()
    self.assertEqual('pre', self.settings._GetExternalPem('predefined'))
    self.assertEqual('new', self.settings._GetExternalPem('new_pem'))
    self.assertEqual(self.settings._settings['new_pem'], 'new')
    self.mox.VerifyAll()
Test _GetExternalPem().
dataset/ETHPy150Open google/simian/src/tests/simian/settings_test.py/FilesystemSettingsTest.testGetExternalPem