From 6314b6a7de737a904e2ba8b55d549e75185a4e30 Mon Sep 17 00:00:00 2001 From: ReimarBauer Date: Mon, 19 Aug 2024 16:07:52 +0200 Subject: [PATCH] content to save corrected --- tests/_test_mscolab/test_files.py | 8 ++++---- tests/_test_mscolab/test_files_api.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/_test_mscolab/test_files.py b/tests/_test_mscolab/test_files.py index 00ede4ec3..c08524d7b 100644 --- a/tests/_test_mscolab/test_files.py +++ b/tests/_test_mscolab/test_files.py @@ -32,7 +32,7 @@ from mslib.mscolab.models import User, Operation, Permission, Change, Message from mslib.mscolab.seed import add_user, get_user from mslib.mscolab.utils import get_recent_op_id -from tests.utils import XML_CONTENT1, XML_CONTENT2 +from tests.utils import XML_CONTENT1, XML_CONTENT2, XML_CONTENT3 class Test_Files: @@ -127,15 +127,15 @@ def test_cant_save(self): def test_undo(self): with self.app.test_client(): - flight_path, operation = self._create_operation(flight_path="operation7", content="alpha") - assert self.fm.save_file(operation.id, XML_CONTENT1, self.user) + flight_path, operation = self._create_operation(flight_path="operation7", content=XML_CONTENT1) assert self.fm.save_file(operation.id, XML_CONTENT2, self.user) + assert self.fm.save_file(operation.id, XML_CONTENT3, self.user) changes = Change.query.filter_by(op_id=operation.id).all() assert changes is not None assert changes[0].id == 1 assert self.fm.undo_changes(changes[0].id, self.user) is True assert len(self.fm.get_all_changes(operation.id, self.user)) == 3 - assert XML_CONTENT1 == self.fm.get_file(operation.id, self.user) + assert XML_CONTENT2 == self.fm.get_file(operation.id, self.user) def test_get_operation(self): with self.app.test_client(): diff --git a/tests/_test_mscolab/test_files_api.py b/tests/_test_mscolab/test_files_api.py index 7ee46f271..14e4b871e 100644 --- a/tests/_test_mscolab/test_files_api.py +++ b/tests/_test_mscolab/test_files_api.py @@ -182,7 +182,7 @@ def test_get_all_changes(self): def test_get_change_content(self): with self.app.test_client(): - flight_path, operation = self._create_operation(flight_path="V12", content='initial') + flight_path, operation = self._create_operation(flight_path="V12", content=XML_CONTENT3) assert self.fm.save_file(operation.id, XML_CONTENT1, self.user) assert self.fm.save_file(operation.id, XML_CONTENT2, self.user) assert self.fm.save_file(operation.id, XML_CONTENT3, self.user) @@ -194,7 +194,7 @@ def test_get_change_content(self): def test_set_version_name(self): with self.app.test_client(): - flight_path, operation = self._create_operation(flight_path="V13", content='initial') + flight_path, operation = self._create_operation(flight_path="V13", content=XML_CONTENT3) assert self.fm.save_file(operation.id, XML_CONTENT1, self.user) all_changes = self.fm.get_all_changes(operation.id, self.user) ch_id = all_changes[-1]["id"]