From b5e6955878d451e79d4d64d0d3ed31297e254282 Mon Sep 17 00:00:00 2001 From: "Morten W. Hansen" Date: Tue, 12 Nov 2024 21:26:12 +0100 Subject: [PATCH] #236: fix flake errors --- tests/test_dist/test_pycsw_dist.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_dist/test_pycsw_dist.py b/tests/test_dist/test_pycsw_dist.py index ac123bd..bc2ee44 100644 --- a/tests/test_dist/test_pycsw_dist.py +++ b/tests/test_dist/test_pycsw_dist.py @@ -121,8 +121,8 @@ def testDistPyCSW_Update(monkeypatch, mockXml, mockXslt, tmpUUID, tmpConf): tstPyCSW._worker = tstWorker tstPyCSW._conf.mmd_xsl_path = mockXslt assert tstPyCSW.run() == (True, "Mock response") - #tstPyCSW._worker._namespace = "test.no" - #assert tstPyCSW.run() == (True, "Mock response") + tstPyCSW._worker._namespace = "test.no" + assert tstPyCSW.run() == (True, "Mock response") # Update returns False with monkeypatch.context() as mp: @@ -148,9 +148,11 @@ def testDistPyCSW_Update(monkeypatch, mockXml, mockXslt, tmpUUID, tmpConf): False, "http://localhost: service unavailable. Failed to update." ) + # Insert within update fails def new_delete(cls, *a, **k): return True, "" + with mock.patch.object(PyCSWDist, '_delete', new=new_delete): mp.setattr( "dmci.distributors.pycsw_dist.requests.post", causeException)