Пример #1
0
    def addGeneralTestSettingValuesOverrideValuesTest(self):
        newValueMap = {}
        newValueMap.put("BrowserOverride", "CHROME")
        newValueMap.put("TimeoutOverride", "13333333")

        Config.addGeneralTestSettingValues(newValueMap, True)
        self.assertEquals(Config.getGeneralValue("BrowserOverride"), "CHROME")
        self.assertEquals(Config.getGeneralValue("TimeoutOverride"),
                          "13333333")
Пример #2
0
    def addGeneralTestSettingValuesDontOverrideValuesTest(self):
        newValueMap = {}
        newValueMap.put("DontBrowserOverride", "CHROME")
        newValueMap.put("DontTimeoutOverride", "13333333")

        newValueMapTwo = {}
        newValueMapTwo.put("DontBrowserOverride", "IE")
        newValueMapTwo.put("DontTimeoutOverride", "5555")

        # add values to the override config since the values don't exist in the override config
        Config.addGeneralTestSettingValues(newValueMap, False)
        self.assertEquals(Config.getGeneralValue("DontBrowserOverride"),
                          "CHROME")
        self.assertEquals(Config.getGeneralValue("DontTimeoutOverride"),
                          "13333333")

        # don't add the values to the override config since the values do exist in the override config
        Config.addGeneralTestSettingValues(newValueMapTwo, False)
        self.assertEquals(Config.getGeneralValue("DontBrowserOverride"),
                          "CHROME")
        self.assertEquals(Config.getGeneralValue("DontTimeoutOverride"),
                          "13333333")

        # do add the values because of the override flag
        Config.addGeneralTestSettingValues(newValueMapTwo, True)
        self.assertEquals(Config.getGeneralValue("DontBrowserOverride"), "IE")
        self.assertEquals(Config.getGeneralValue("DontTimeoutOverride"),
                          "5555")