def testGetattr(self):
    self.mox.StubOutWithMock(self.settings, '_Get')

    self.settings._Get('foo').AndReturn(2)
    self.settings._Get('dne').AndRaise(AttributeError('DNE'))
    self.settings._Get('dne').AndRaise(AttributeError('non conform'))

    self.mox.ReplayAll()
    self.assertEqual(self.settings._is_class, 1)
    self.assertEqual(self.settings.foo, 2)
    self.assertRaises(
        AttributeError,
        getattr,
        self.settings,
        'DNE')
    self.assertRaises(
        AttributeError,
        getattr,
        self.settings,
        'DNE')
    self.assertRaises(
        AttributeError,
        getattr,
        self.settings,
        '_foobar')
    self.mox.VerifyAll()
Test __getattr__().
dataset/ETHPy150Open google/simian/src/tests/simian/settings_test.py/BaseSettingsTest.testGetattr