-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Tests
The test is failing every time:
$ python -m pytest -n0 tests/old_functional/test_direct_edit.py::TestDirectEdit::test_blob_with_non_standard_digest_and_standard_algo $ python -m pytest -n0 tests/old_functional/test_direct_edit.py::TestDirectEditNoSync::test_blob_with_non_standard_digest_and_standard_algo
def test_blob_with_non_standard_digest_and_standard_algo(self): """It should be possible to edit a document having a blob with a non-standard digest but with a standard algorithm. """ from_dict_orig = Blob.from_dict def from_dict(blob: Dict[str, Any]) -> Blob: # Alter digest stuff blob["digest"] += "-2" return from_dict_orig(blob) filename = "picture-with-non-standard-digest.png" content = random_png(size=42) # make_file() will make use of the FileManager and thus creating a Picture document doc_id = self.remote.make_file("/", filename, content=content) scheme, host = self.nuxeo_url.split("://") url = ( f"nxdrive://edit/{scheme}/{host}" f"/user/{self.user_1}" "/repo/default" f"/nxdocid/{doc_id}" f"/filename/{filename}" f"/downloadUrl/nxfile/default/{doc_id}" f"/file:content/{filename}" ) content_updated = random_png(size=24) with patch.object(Blob, "from_dict", new=from_dict), ensure_no_exception(): > self._direct_edit_update(doc_id, filename, content_updated, url=url)
- Is referenced in