From b73b8fd38c4cad47ca6443b8de5ba2b7141a5100 Mon Sep 17 00:00:00 2001
From: Erwan Rouchet <rouchet@teklia.com>
Date: Wed, 5 Feb 2020 10:16:44 +0100
Subject: [PATCH] Replace asyncmock with mock 4.x

---
 arkindex/documents/tests/consumers/test_ml_results_consumer.py | 2 +-
 arkindex/documents/tests/test_admin_api.py                     | 2 +-
 arkindex/documents/tests/test_corpus.py                        | 2 +-
 arkindex/documents/tests/test_ml_results.py                    | 2 +-
 arkindex/documents/tests/test_pagexml.py                       | 2 +-
 arkindex/documents/tests/test_transcription_create.py          | 2 +-
 arkindex/himanis/tests/test_acts_importer.py                   | 2 +-
 arkindex/images/tests/test_perform_check.py                    | 2 +-
 tests-requirements.txt                                         | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arkindex/documents/tests/consumers/test_ml_results_consumer.py b/arkindex/documents/tests/consumers/test_ml_results_consumer.py
index 6d66a5ef14..b3b3bb3110 100644
--- a/arkindex/documents/tests/consumers/test_ml_results_consumer.py
+++ b/arkindex/documents/tests/consumers/test_ml_results_consumer.py
@@ -1,5 +1,5 @@
 from unittest.mock import patch
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from django.db.models import Q
 from arkindex_common.enums import TranscriptionType, MetaType, EntityType
 from arkindex.project.polygon import Polygon
diff --git a/arkindex/documents/tests/test_admin_api.py b/arkindex/documents/tests/test_admin_api.py
index 7a46859ddd..165b219fcc 100644
--- a/arkindex/documents/tests/test_admin_api.py
+++ b/arkindex/documents/tests/test_admin_api.py
@@ -1,5 +1,5 @@
 from unittest.mock import patch
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from django.urls import reverse
 from rest_framework import status
 from arkindex.project.tests import FixtureTestCase
diff --git a/arkindex/documents/tests/test_corpus.py b/arkindex/documents/tests/test_corpus.py
index 337261e689..54a061aba0 100644
--- a/arkindex/documents/tests/test_corpus.py
+++ b/arkindex/documents/tests/test_corpus.py
@@ -1,4 +1,4 @@
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from unittest.mock import patch
 from django.contrib.auth.models import AnonymousUser
 from django.db.models import Model, ProtectedError
diff --git a/arkindex/documents/tests/test_ml_results.py b/arkindex/documents/tests/test_ml_results.py
index 23cdc57100..acec3ff2e4 100644
--- a/arkindex/documents/tests/test_ml_results.py
+++ b/arkindex/documents/tests/test_ml_results.py
@@ -1,4 +1,4 @@
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from unittest.mock import patch
 from django.urls import reverse
 from rest_framework import status
diff --git a/arkindex/documents/tests/test_pagexml.py b/arkindex/documents/tests/test_pagexml.py
index b2994b11c5..abcb2319a9 100644
--- a/arkindex/documents/tests/test_pagexml.py
+++ b/arkindex/documents/tests/test_pagexml.py
@@ -1,6 +1,6 @@
 from pathlib import Path
 from unittest.mock import patch
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from django.urls import reverse
 from rest_framework import status
 from arkindex.project.tests import FixtureAPITestCase
diff --git a/arkindex/documents/tests/test_transcription_create.py b/arkindex/documents/tests/test_transcription_create.py
index 4bb68e8087..e1ff912fdf 100644
--- a/arkindex/documents/tests/test_transcription_create.py
+++ b/arkindex/documents/tests/test_transcription_create.py
@@ -1,6 +1,6 @@
 from django.urls import reverse
 from unittest.mock import patch
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from rest_framework import status
 from arkindex.project.tests import FixtureAPITestCase
 from arkindex.project.polygon import Polygon
diff --git a/arkindex/himanis/tests/test_acts_importer.py b/arkindex/himanis/tests/test_acts_importer.py
index e49d5e1a71..6400d8ec7c 100644
--- a/arkindex/himanis/tests/test_acts_importer.py
+++ b/arkindex/himanis/tests/test_acts_importer.py
@@ -1,6 +1,6 @@
 from unittest.mock import patch
 from pathlib import Path
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from arkindex_common.enums import MetaType
 from arkindex.project.tests import FixtureTestCase
 from arkindex.project.polygon import Polygon
diff --git a/arkindex/images/tests/test_perform_check.py b/arkindex/images/tests/test_perform_check.py
index e75077b8f1..d37c4c4453 100644
--- a/arkindex/images/tests/test_perform_check.py
+++ b/arkindex/images/tests/test_perform_check.py
@@ -1,5 +1,5 @@
 from unittest.mock import patch, call
-from asyncmock import AsyncMock
+from mock import AsyncMock
 from arkindex.project.aws import S3FileStatus
 from arkindex.project.tests import FixtureTestCase
 import requests
diff --git a/tests-requirements.txt b/tests-requirements.txt
index 8381422153..06985e8590 100644
--- a/tests-requirements.txt
+++ b/tests-requirements.txt
@@ -4,4 +4,4 @@ django-nose
 coverage
 uritemplate==3
 responses
-asyncmock==0.4.1
+mock~=4.0.0
-- 
GitLab