Skip to content

Commit 34c4750

Browse files
author
mwwsp
committed
updated with py27 dependencies
1 parent fe4d041 commit 34c4750

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

axe_selenium_python/tests/test_axe.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66

77
import json
88
import pytest
9-
from unittest import mock
109
from selenium import webdriver
1110

11+
import sys
12+
if sys.version_info >= (3, 3):
13+
from unittest.mock import MagicMock
14+
else:
15+
from mock import MagicMock
16+
1217
from ..axe import Axe
1318

1419
_DEFAULT_TEST_FILE = path.join(path.dirname(__file__), "test_page.html")
@@ -76,7 +81,7 @@ def tempdir():
7681

7782

7883
def test_write_results_to_file(tempdir):
79-
axe = Axe(mock.MagicMock())
84+
axe = Axe(MagicMock())
8085
data = json.dumps({"testKey": "testValue"})
8186
filename = path.join(tempdir, "results.json")
8287

0 commit comments

Comments
 (0)