Skip to content

Commit

Permalink
Add test case for positive archival
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-allan committed Aug 29, 2024
1 parent 68e99e5 commit 7691f51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/unit/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7691f51

Please sign in to comment.