Exemplo n.º 1
0
    def testHandlesConfigOption(self):
        input_dict = {
            "AdminUI.heading": "test heading",
            "AdminUI.report_url": "test report url",
            "AdminUI.help_url": "test help url",
            "AdminUI.profile_image_url": "test profile image url",
            "Source.version_string": "1.2.3.4",
        }

        with test_lib.ConfigOverrider(input_dict):
            request = mock.MagicMock()
            result = config_plugin.ApiGetUiConfigHandler().Handle(request)

        self.assertEqual(result.heading, "test heading")
        self.assertEqual(result.report_url, "test report url")
        self.assertEqual(result.help_url, "test help url")
        self.assertEqual(result.grr_version, "1.2.3.4")
        self.assertEqual(result.profile_image_url, "test profile image url")
 def GetUiConfig(self, args, context=None):
     return api_config.ApiGetUiConfigHandler()
Exemplo n.º 3
0
 def GetUiConfig(self, args, token=None):
   return api_config.ApiGetUiConfigHandler()