def testDir(self):
    entity_names = ['ello', 'there', 'ol', 'chap']
    all_entities = []
    class Junk(object):
      pass
    for entity_name in entity_names:
      e = Junk()
      e.name = entity_name
      all_entities.append(e)

    mock_models = self.mox.CreateMockAnything()
    mock_settings = self.mox.CreateMockAnything()
    self.settings._module.models = mock_models
    mock_models.Settings = mock_settings
    mock_settings.GetAll().AndReturn(all_entities)

    self.mox.ReplayAll()
    self.assertEqual(entity_names, self.settings._Dir())
    self.mox.VerifyAll()
Test _Dir().
dataset/ETHPy150Open google/simian/src/tests/simian/settings_test.py/DatastoreSettingsTest.testDir