Skip to content

Commit

Permalink
Cross python version mock import
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Nov 30, 2022
1 parent 8d68f3b commit 0b1fca6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ckanext/xloader/tests/test_action.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import pytest
import mock
try:
from unittest import mock
except ImportError:
import mock

from ckan.tests import helpers, factories

Expand Down
5 changes: 4 additions & 1 deletion ckanext/xloader/tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import pytest

from nose.tools import make_decorator
import mock
try:
from unittest import mock
except ImportError:
import mock
import responses
from sqlalchemy import MetaData, Table
from sqlalchemy.sql import select
Expand Down
5 changes: 4 additions & 1 deletion ckanext/xloader/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

import datetime
import pytest
import mock
try:
from unittest import mock
except ImportError:
import mock
from six import text_type as str
from ckan.tests import helpers, factories
from ckan.logic import _actions
Expand Down

0 comments on commit 0b1fca6

Please sign in to comment.