From c8a441840972422c7151f02a5b292db31f7036d1 Mon Sep 17 00:00:00 2001
From: vuillaut <thomas.vuillaume@gmail.com>
Date: Thu, 2 Dec 2021 19:17:19 +0100
Subject: [PATCH] sleep before testing if the request is pending

---
 eossr/api/zenodo/tests/test_zenodo.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eossr/api/zenodo/tests/test_zenodo.py b/eossr/api/zenodo/tests/test_zenodo.py
index 6e001a98..cdce7767 100644
--- a/eossr/api/zenodo/tests/test_zenodo.py
+++ b/eossr/api/zenodo/tests/test_zenodo.py
@@ -6,6 +6,7 @@ import unittest
 import requests
 import pytest
 import tempfile
+import time
 from pathlib import Path
 from eossr import ROOT_DIR
 from eossr.api.zenodo import ZenodoAPI, get_zenodo_records, get_record, Record
@@ -137,6 +138,7 @@ class TestZenodoAPIToken(unittest.TestCase):
         ## Add to escape2020 community and test request
         meta = {'communities': [{'identifier': escape_community}]}
         zk.update_record_metadata(record_id, meta)
+        time.sleep(1)
         records = self.zenodo.get_community_pending_requests(escape_community)
         assert record_id in [rec.id for rec in records]
 
-- 
GitLab