Esempio n. 1
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     holmium.core.noseplugin.BROWSER_MAPPING = build_mock_mapping("remote")
     holmium.core.noseplugin.BROWSER_MAPPING.update(
         build_mock_mapping("chrome"))
     ENV.clear()
     super(TestOptionsWithChrome, self).setUp()
Esempio n. 2
0
 def test_browser_per_test(self):
     with mock.patch.dict('holmium.core.testcase.BROWSER_MAPPING', build_mock_mapping("firefox")):
         runtc({"HO_BROWSER":"firefox", "HO_BROWSER_PER_TEST":"1"}, [])
         self.assertEquals(holmium.core.testcase.BROWSER_MAPPING["firefox"].return_value.quit.call_count, 1)
     ENV.clear()
     with mock.patch.dict('holmium.core.testcase.BROWSER_MAPPING', build_mock_mapping("firefox")):
         runtc({"HO_BROWSER":"firefox", "HO_BROWSER_PER_TEST":"0"}, [])
         self.assertEquals(holmium.core.testcase.BROWSER_MAPPING["firefox"].return_value.quit.call_count, 0)
Esempio n. 3
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     mock_browsers = build_mock_mapping("chrome")
     def fake_construct(*a, **k):
         raise Exception("failed to initialize")
     mock_browsers["chrome"].side_effect = fake_construct
     holmium.core.noseplugin.BROWSER_MAPPING.update(mock_browsers)
     ENV.clear()
     super(TestDriverBroken,self).setUp()
Esempio n. 4
0
    def setUp(self):
        self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
        mock_browsers = build_mock_mapping("chrome")

        def fake_construct(*a, **k):
            raise Exception("failed to initialize")

        mock_browsers["chrome"].side_effect = fake_construct
        holmium.core.noseplugin.BROWSER_MAPPING.update(mock_browsers)
        ENV.clear()
        super(TestDriverBroken, self).setUp()
Esempio n. 5
0
 def test_browser_per_test(self):
     with mock.patch.dict('holmium.core.testcase.BROWSER_MAPPING',
                          build_mock_mapping("firefox")):
         runtc({"HO_BROWSER": "firefox", "HO_BROWSER_PER_TEST": "1"}, [])
         self.assertEquals(
             holmium.core.testcase.BROWSER_MAPPING["firefox"].return_value.
             quit.call_count, 1)
     ENV.clear()
     with mock.patch.dict('holmium.core.testcase.BROWSER_MAPPING',
                          build_mock_mapping("firefox")):
         runtc({"HO_BROWSER": "firefox", "HO_BROWSER_PER_TEST": "0"}, [])
         self.assertEquals(
             holmium.core.testcase.BROWSER_MAPPING["firefox"].return_value.
             quit.call_count, 0)
Esempio n. 6
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     holmium.core.noseplugin.BROWSER_MAPPING = build_mock_mapping("remote")
     holmium.core.noseplugin.BROWSER_MAPPING.update(build_mock_mapping("phantomjs"))
     ENV.clear()
     super(TestOptionsWithPhantom,self).setUp()
Esempio n. 7
0
 def setUp(self):
     ENV.clear()
     super(TestCapabilitiesFromFile,self).setUp()
Esempio n. 8
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     mock_browsers = build_mock_mapping("chrome")
     holmium.core.noseplugin.BROWSER_MAPPING.update(mock_browsers)
     ENV.clear()
     super(TestNoDriver,self).setUp()
Esempio n. 9
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     holmium.core.noseplugin.BROWSER_MAPPING.update(
         build_mock_mapping("chrome"))
     ENV.clear()
     super(TestConfigJson, self).setUp()
Esempio n. 10
0
 def setUp(self):
     ENV.clear()
     super(TestCapabilitiesFromFile, self).setUp()
Esempio n. 11
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     mock_browsers = build_mock_mapping("chrome")
     holmium.core.noseplugin.BROWSER_MAPPING.update(mock_browsers)
     ENV.clear()
     super(TestMultipleDriversWithReusedBrowsers, self).setUp()
Esempio n. 12
0
 def setUp(self):
     if "driver" in ENV:
         ENV.pop("driver")
 def setUp(self):
     ENV.clear()
Esempio n. 14
0
 def setUp(self):
     if "driver" in ENV:
         ENV.pop("driver")
Esempio n. 15
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     holmium.core.noseplugin.BROWSER_MAPPING.update(build_mock_mapping("chrome"))
     ENV.clear()
     super(TestConfigPy,self).setUp()
 def setUp(self):
     ENV.clear()
Esempio n. 17
0
 def setUp(self):
     self.old_mapping = holmium.core.noseplugin.BROWSER_MAPPING
     mock_browsers = build_mock_mapping("chrome")
     holmium.core.noseplugin.BROWSER_MAPPING.update(mock_browsers)
     ENV.clear()
     super(TestCapabilitiesFromFile, self).setUp()