Skip to content

Commit

Permalink
removes other mock depenencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham authored and davidmiller committed Apr 20, 2020
1 parent d1d1f3c commit ea0e8e9
Show file tree
Hide file tree
Showing 42 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion opal/core/pathway/tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
from opal.core.test import OpalTestCase
from django.urls import reverse
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
from opal.core.pathway.tests.pathway_test import pathways as test_pathways


Expand Down
2 changes: 1 addition & 1 deletion opal/core/pathway/tests/test_context_processors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Test the opal.core.pathways.context_processors module
"""
from mock import patch
from unittest.mock import patch
from django.test import TestCase
from opal.core.pathway import context_processors
from opal.core.pathway import Pathway
Expand Down
2 changes: 1 addition & 1 deletion opal/core/pathway/tests/test_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unittests for opal.core.pathway.steps
"""
from django.urls import reverse
from mock import MagicMock
from unittest.mock import MagicMock

from opal.core import exceptions
from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/core/pathway/tests/test_template_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unittests for the opal.core.pathways.templatetags package
"""
from django.template import Template, Context
from mock import patch
from unittest.mock import patch

from opal.core.test import OpalTestCase
from opal.tests.models import Colour
Expand Down
2 changes: 1 addition & 1 deletion opal/core/search/tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from opal.core.test import OpalTestCase
from mock import patch
from unittest.mock import patch
from opal.core.search import api
from rest_framework.reverse import reverse
from rest_framework import status
Expand Down
2 changes: 1 addition & 1 deletion opal/core/search/tests/test_search_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.db import transaction
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
from reversion import revisions as reversion
from opal.tests.episodes import RestrictedEpisodeCategory

Expand Down
2 changes: 1 addition & 1 deletion opal/core/search/tests/test_search_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch
import datetime

from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/core/search/tests/test_tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for the opal.core.search.tasks module
"""
from mock import patch
from unittest.mock import patch
from opal.core.test import OpalTestCase

from opal.core.search import tasks
Expand Down
2 changes: 1 addition & 1 deletion opal/core/search/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.core.serializers.json import DjangoJSONEncoder
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from mock import patch, mock_open
from unittest.mock import patch, mock_open

from opal import models
from opal.tests import models as tmodels
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.db import DataError
from django.http import Http404
from django.contrib.contenttypes.models import ContentType
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from rest_framework.test import APIClient
from rest_framework.reverse import reverse
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_celery.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for opal.core.celery
"""
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_command_create_random_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unittests for opal.management.commands.create_random_data
"""
import datetime
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from opal.core.test import OpalTestCase
from opal.models import Patient
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_command_detect_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import datetime

from mock import patch
from unittest.mock import patch

from opal.core.test import OpalTestCase
from opal import models
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_command_dump_lookup_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

from django.contrib.contenttypes.models import ContentType
from mock import patch, call, mock_open, MagicMock
from unittest.mock import patch, call, mock_open, MagicMock

from opal.core.test import OpalTestCase
from opal.models import Symptom, Synonym
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_command_load_lookup_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unittests for opal.management.commands.load_lookup_lists
"""
import os
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from opal.core import application
from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_command_scaffold.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from opal.management.commands import scaffold
from opal.core.test import OpalTestCase
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock


@patch("opal.management.commands.scaffold.core_scaffold")
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_context_processors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Test the opal.context_processors module
"""
from mock import patch
from unittest.mock import patch
from django.test import TestCase
from opal import context_processors
from opal.core.subrecords import subrecords
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import copy

from django.contrib.auth.models import AnonymousUser
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import sys

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

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_discoverable.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for the opal.core.discoverable module
"""
from mock import patch
from unittest.mock import patch
from django.test import override_settings

from opal.core import exceptions
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import operator
import warnings

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

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import copy

from mock import patch
from unittest.mock import patch

from opal.core.test import OpalTestCase
from opal.core import menus
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tests for schema utilities
"""
from django.test import TestCase
from mock import patch
from unittest.mock import patch

from opal.core import schemas
from opal.tests.models import Colour, HatWearer, FamousLastWords
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_signals_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
opal.core.signals.worker are called at the appropriate
times and with the appropriate signature.
"""
from mock import MagicMock
from unittest.mock import MagicMock
from django.dispatch import receiver

from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tests for OpalTestCase helpers that might not be explicitly used in OPAL itself
but are useful for applications.
"""
from mock import patch
from unittest.mock import patch

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_core_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import subprocess

import ffs
from mock import MagicMock, patch, call
from unittest.mock import MagicMock, patch, call

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_episode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unittests for opal.models.Episode
"""
import datetime
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
import six

from django.contrib.auth.models import User
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for opal.forms
"""
from mock import MagicMock, patch
from unittest.mock import MagicMock, patch

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import os
import datetime
from mock import patch
from unittest.mock import patch

from django.conf import settings
from django.utils import timezone
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_models_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytz

from django.db import models
from mock import patch
from unittest.mock import patch

from opal.core import exceptions
from opal.core.fields import ForeignKeyOrFreeText
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import datetime

from mock import patch
from unittest.mock import patch
from opal.core.test import OpalTestCase

from opal.models import Patient, Episode
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_patient_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from django.urls import reverse
from django.contrib.auth.models import User
from mock import MagicMock, PropertyMock, patch
from unittest.mock import MagicMock, PropertyMock, patch

from opal.core import exceptions
from opal.tests import models
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_scaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess
import tempfile

from mock import patch, MagicMock
from unittest.mock import patch, MagicMock
import ffs
import opal
from opal.tests import models
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_application.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for the opal.templatetags.application module
"""
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from django.template import Template, Context

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Tests for our modal/form helpers
"""
import json
from mock import patch
from unittest.mock import patch

from django.template import Template, Context
from django.test import TestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Unittests for opal.templatetags.menus
"""
from django.template import Context
from mock import MagicMock
from unittest.mock import MagicMock

from opal.core import test

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import os

from mock import patch
from unittest.mock import patch

from django.template import Template, Context
from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_patient_lists.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for opal.templatetags.patient_lists
"""
from mock import MagicMock
from unittest.mock import MagicMock

from opal.core.test import OpalTestCase

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_templatetags_plugins.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Unittests for the opal.templatetags.plugins module
"""
from mock import patch
from unittest.mock import patch

from opal.core import plugins
from opal.core import menus
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_user_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from django.contrib.auth.models import User
from django.test import TestCase
from mock import patch
from unittest.mock import patch

from opal.models import UserProfile

Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from django.test import TestCase
from django.db.models import ForeignKey, CharField
from mock import patch
from unittest.mock import patch

from opal.core import exceptions
from opal.core.test import OpalTestCase
Expand Down
2 changes: 1 addition & 1 deletion opal/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.http import QueryDict
from django.test import TestCase
from django.test.client import RequestFactory
from mock import patch, MagicMock
from unittest.mock import patch, MagicMock

from opal import models, views
from opal.core import detail, patient_lists
Expand Down

0 comments on commit ea0e8e9

Please sign in to comment.