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

Fixing two deprecations #1253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 edx_proctoring/backends/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import time

from mock import patch
from unittest.mock import patch

from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/backends/tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ddt
import jwt
import responses
from mock import patch
from unittest.mock import patch

from django.test import TestCase, override_settings
from django.utils import translation
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/backends/tests/test_software_secure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import ddt
from httmock import HTTMock, all_requests
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch

from django.contrib.auth import get_user_model
from django.test import TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from datetime import datetime

import pytz
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch

from django.core.management import call_command

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tests for the update_attempts_for_exam management command
"""

from mock import patch
from unittest.mock import patch

from django.contrib.auth import get_user_model
from django.core.management import call_command
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import ddt
import pytz
from freezegun import freeze_time
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch

from django.conf import settings
from django.core import mail
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from itertools import product

import ddt
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch
from opaque_keys import InvalidKeyError

from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_mfe_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from urllib.parse import urlencode

import ddt
from mock import patch
from unittest.mock import patch
from opaque_keys.edx.locator import BlockUsageLocator

from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_get_practice_proctored_exams_for_course(self):
is_practice_exam=True
)

self.assertQuerysetEqual(
self.assertQuerySetEqual(
ProctoredExam.get_practice_proctored_exams_for_course(course_id), list(practice_proctored_exams)
)

Expand Down
5 changes: 2 additions & 3 deletions edx_proctoring/tests/test_reviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
import json

import ddt
import mock
from crum import set_current_request
from mock import call, patch
from unittest.mock import call, patch

from django.contrib.auth import get_user_model
from django.test import RequestFactory
Expand Down Expand Up @@ -588,7 +587,7 @@ def test_review_update_attempt_active_field(self):
self.assertTrue(review.is_attempt_active)

# now delete the attempt, which puts it into the archive table
with mock.patch('edx_proctoring.api.update_attempt_status') as mock_update_status:
with patch('edx_proctoring.api.update_attempt_status') as mock_update_status:
remove_exam_attempt(self.attempt_id, requesting_user=self.user)

# check that the field has been updated
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_student_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import ddt
import pytz
from freezegun import freeze_time
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch

from django.test.utils import override_settings
from django.urls import reverse
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pytz
from freezegun import freeze_time
from httmock import HTTMock
from mock import Mock, patch
from unittest.mock import Mock, patch
from opaque_keys.edx.locator import BlockUsageLocator

from django.contrib.auth import get_user_model
Expand Down
2 changes: 1 addition & 1 deletion edx_proctoring/tests/test_workerconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import tempfile
import unittest

from mock import patch
from unittest.mock import patch

from django.conf import settings

Expand Down