Write test_initialize_webdriver
This commit is contained in:
parent
d39f859464
commit
3f00a144b4
|
@ -1,13 +1,16 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
from unittest.mock import patch
|
||||||
|
|
||||||
import jardin
|
import jardin
|
||||||
|
|
||||||
class TestJardin(unittest.TestCase):
|
class TestJardin(unittest.TestCase):
|
||||||
@mock.patch("webdriver.Firefox")
|
@patch("selenium.webdriver.Firefox")
|
||||||
def test_initialize_webdriver(self, mockFirefox):
|
def test_initialize_webdriver(self, mockFirefox):
|
||||||
jardin.initialize_webdriver()
|
jardin.initialize_webdriver()
|
||||||
|
|
||||||
mockFirefox.assert_called_once()
|
mockFirefox.assert_called_once()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue