We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe4d041 commit 34c4750Copy full SHA for 34c4750
axe_selenium_python/tests/test_axe.py
@@ -6,9 +6,14 @@
6
7
import json
8
import pytest
9
-from unittest import mock
10
from selenium import webdriver
11
+import sys
12
+if sys.version_info >= (3, 3):
13
+ from unittest.mock import MagicMock
14
+else:
15
+ from mock import MagicMock
16
+
17
from ..axe import Axe
18
19
_DEFAULT_TEST_FILE = path.join(path.dirname(__file__), "test_page.html")
@@ -76,7 +81,7 @@ def tempdir():
76
81
77
82
78
83
def test_write_results_to_file(tempdir):
79
- axe = Axe(mock.MagicMock())
84
+ axe = Axe(MagicMock())
80
85
data = json.dumps({"testKey": "testValue"})
86
filename = path.join(tempdir, "results.json")
87
0 commit comments