Skip to content

Commit

Permalink
Drop use of mock and six (#1723)
Browse files Browse the repository at this point in the history
Now that Python >= 3.5 is the minimal version supported, remove all
remaining traces of the external mock module, as well as one use of six
that is no longer required.
  • Loading branch information
s-t-e-v-e-n-k committed Jun 11, 2022
1 parent 5be2771 commit cde0271
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion requirements-dev.txt
Expand Up @@ -6,7 +6,6 @@ pytest-django
pytest-cov
factory-boy
requests
mock
pygments
vobject

Expand Down
8 changes: 2 additions & 6 deletions tests/db/fields/test_uniq_field_mixin_compat.py
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
try:
from unittest import mock
except ImportError:
import mock
from unittest import mock

import six
from django.db import models
from django.test import TestCase
from tests.testapp.models import (
Expand All @@ -20,7 +16,7 @@ def setUp(self):

class MockField(UniqueFieldMixin):
def __init__(self, **kwargs):
for key, value in six.iteritems(kwargs):
for key, value in kwargs.items():
setattr(self, key, value)

self.uniq_field = MockField(
Expand Down
2 changes: 1 addition & 1 deletion tests/management/commands/test_clear_cache.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import os
from io import StringIO

Expand Down
2 changes: 1 addition & 1 deletion tests/test_management_command.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import os
import mock
from unittest import mock
import logging
import importlib

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sqldiff.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import mock
from unittest import mock
import pytest
from io import StringIO

Expand Down

0 comments on commit cde0271

Please sign in to comment.