Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove usage of old mock #513

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbbackup/tests/commands/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import logging
import os
from io import BytesIO
from unittest.mock import patch

from django.core.files import File
from django.test import TestCase
from mock import patch

from dbbackup.management.commands._base import BaseDbBackupCommand
from dbbackup.storage import get_storage
Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/commands/test_listbackups.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from io import StringIO
from unittest.mock import patch

from django.core.management import execute_from_command_line
from django.test import TestCase
from mock import patch

from dbbackup.management.commands.listbackups import Command as ListbackupsCommand
from dbbackup.storage import get_storage
Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/functional/test_commands.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
import tempfile
from unittest.mock import patch

from django.conf import settings
from django.core.management import execute_from_command_line
from django.test import TransactionTestCase as TestCase
from mock import patch

from dbbackup.tests.testapp import models
from dbbackup.tests.utils import (
Expand Down
3 changes: 2 additions & 1 deletion dbbackup/tests/test_checks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from unittest.mock import patch

from django.test import TestCase
from mock import patch

try:
from dbbackup import checks
Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/test_connectors/test_mongodb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import BytesIO
from unittest.mock import patch

from django.test import TestCase
from mock import patch

from dbbackup.db.mongodb import MongoDumpConnector

Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/test_connectors/test_mysql.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import BytesIO
from unittest.mock import patch

from django.test import TestCase
from mock import patch

from dbbackup.db.mysql import MysqlDumpConnector

Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/test_connectors/test_sqlite.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from io import BytesIO
from unittest.mock import mock_open, patch

from django.db import connection
from django.test import TestCase
from mock import mock_open, patch

from dbbackup.db.sqlite import SqliteConnector, SqliteCPConnector
from dbbackup.tests.testapp.models import CharModel
Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/test_log.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import logging
from unittest.mock import patch

import django
from django.core import mail
from django.test import TestCase
from mock import patch
from testfixtures import log_capture

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

from django.test import TestCase
from mock import patch

from dbbackup import utils
from dbbackup.storage import Storage, get_storage
Expand Down
2 changes: 1 addition & 1 deletion dbbackup/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import tempfile
from datetime import datetime
from io import StringIO
from unittest.mock import patch

import django
import pytz
from django.core import mail
from django.test import TestCase
from mock import patch

from dbbackup import settings, utils
from dbbackup.tests.utils import (
Expand Down
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
coverage
django-storages
flake8
mock
pep8
psycopg2
pylint
Expand Down
Loading