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

Suppression de la dépendance mock #555

Merged
merged 1 commit into from
Feb 22, 2022
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
7 changes: 3 additions & 4 deletions aidants_connect_web/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from datetime import date, datetime, timedelta
from os.path import join as path_join
from unittest.mock import Mock
from unittest.mock import Mock, patch

from django.conf import settings
from django.db.utils import IntegrityError
from django.test import TestCase, tag
from django.utils import timezone

import mock
from django_otp.plugins.otp_totp.models import TOTPDevice
from freezegun import freeze_time
from pytz import timezone as pytz_timezone
Expand Down Expand Up @@ -1283,7 +1282,7 @@ def test_remove_user_from_organisation_does_not_change_main_org(self):

self.assertEqual(aidant.organisation, supplementary_organisation_1)

@mock.patch("aidants_connect_web.models.aidants__organisations_changed.send")
@patch("aidants_connect_web.models.aidants__organisations_changed.send")
def test_remove_user_from_organisation_sends_signal(self, send: Mock):
aidant: Aidant = AidantFactory()
supplementary_organisation_1 = OrganisationFactory()
Expand Down Expand Up @@ -1367,7 +1366,7 @@ def test_set_organisations_does_not_change_main_org(self):

self.assertEqual(aidant.organisation, supplementary_organisation_1)

@mock.patch("aidants_connect_web.models.aidants__organisations_changed.send")
@patch("aidants_connect_web.models.aidants__organisations_changed.send")
def test_set_organisations_sends_signal(self, send: Mock):
aidant: Aidant = AidantFactory()
previous_organisation = aidant.organisation
Expand Down
2 changes: 1 addition & 1 deletion aidants_connect_web/tests/test_views/test_FC_as_FS.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from datetime import datetime, timedelta
from unittest import mock

from django.conf import settings
from django.test import TestCase, override_settings, tag
from django.test.client import Client
from django.urls import reverse

import jwt
import mock
from freezegun import freeze_time
from pytz import timezone as pytz_timezone

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from unittest import mock

from django.test import TestCase, tag
from django.test.client import Client
from django.urls import resolve

import mock
from django_otp.plugins.otp_totp.models import TOTPDevice

from aidants_connect_web.models import Journal
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ entrypoints==0.3
factory-boy==3.2.1
freezegun==1.1.0
gunicorn==20.1.0
mock==4.0.3
Pillow==9.0.1
psycopg2-binary==2.9.3
ptpython==3.0.20
Expand Down