From 7691f51049f69dd546557a7eea465024f597a983 Mon Sep 17 00:00:00 2001 From: Chris Allan Date: Thu, 29 Aug 2024 20:17:58 +0000 Subject: [PATCH] Add test case for positive archival --- test/unit/test_tree.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/unit/test_tree.py b/test/unit/test_tree.py index 946390c15d..8bbff31f6a 100644 --- a/test/unit/test_tree.py +++ b/test/unit/test_tree.py @@ -263,10 +263,11 @@ def assert_image( date=None, acqDate=None, with_thumbVersion=False, + is_archived=False, ): expected = { "id": 1, - "archived": False, + "archived": is_archived, "ownerId": 10, "name": "name", "permsCss": "canEdit canAnnotate canLink canDelete canChgrp", @@ -323,6 +324,11 @@ def test_marshal_image_map(self, mock_conn, image_data): marshaled = _marshal_image_map(mock_conn, image_data) self.assert_image(marshaled) + def test_marshal_image_map_archived(self, mock_conn, image_data): + image_data["archived"] = True + marshaled = _marshal_image_map(mock_conn, image_data) + self.assert_image(marshaled, is_archived=True) + def test_marshal_image_map_with_pixels(self, mock_conn, image_data_with_pixels): marshaled = _marshal_image_map(mock_conn, image_data_with_pixels) self.assert_image(marshaled, with_pixels=True)