Skip to content

Commit

Permalink
Fixed #245 -- Used unittest.mock.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm committed Dec 17, 2022
1 parent 8eaf86f commit cde0492
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import timedelta
from io import StringIO
from unittest import mock

import mock
from django.core.management.base import CommandError
from django.test import TestCase
from django.utils.timezone import now
Expand Down
3 changes: 2 additions & 1 deletion tests/test_middlewares.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import mock
from unittest import mock

from django.contrib.auth import get_user_model
from django.http import HttpResponse, HttpResponseServerError
from django.test import RequestFactory, TestCase
Expand Down
2 changes: 1 addition & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import socket
from datetime import datetime
from unittest import mock

import mock
from django.contrib.auth import get_user_model
from django.http import HttpRequest, HttpResponse
from django.test import TestCase
Expand Down
3 changes: 2 additions & 1 deletion tests/test_plugins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import mock
from unittest import mock

from django.core import exceptions
from django.test import TestCase

Expand Down
3 changes: 2 additions & 1 deletion tests/test_traffic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import mock
from unittest import mock

from django.core import exceptions
from django.test import TestCase

Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ commands =
test: coverage run ./runtests.py
deps =
coverage
mock==2.0.0
django22: Django>=2.2,<3.0
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
Expand Down

0 comments on commit cde0492

Please sign in to comment.