Skip to content

Commit

Permalink
#236: fix flake errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Nov 12, 2024
1 parent d5d1feb commit b5e6955
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_dist/test_pycsw_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit b5e6955

Please sign in to comment.