From 4e82f3f272ee4a0c8a4b411a0d6c3f62f90df366 Mon Sep 17 00:00:00 2001 From: Joe Heffer Date: Tue, 18 Jun 2024 16:44:00 +0100 Subject: [PATCH] fix: unit test paths --- backend/tests/test_photo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/tests/test_photo.py b/backend/tests/test_photo.py index e645ec1..27e5629 100644 --- a/backend/tests/test_photo.py +++ b/backend/tests/test_photo.py @@ -1,5 +1,8 @@ +import random from http import HTTPStatus +from pathlib import Path +import flask import numpy as np from btviewer.blueprints.photo.model import Photo @@ -7,7 +10,7 @@ def test_photo_array(app): with app.app_context(): - photo = Photo('1970-01-01/set_A/device_1234/camera_1/20200101_094359.123456_000002.np') + photo = Photo('2020-01-01/set_A/device_1/camera_1/20200101_094359.123456_000001.np') assert isinstance(photo.array, np.ndarray) assert photo.array.shape == (1536, 2048) @@ -18,7 +21,7 @@ def test_photo_array(app): def test_photo_jpeg(client): width = 1024 height = 768 - response = client.get('/photos/1970-01-01/set_A/device_1234/camera_1/20200101_094359.123456_000002.jpeg') + response = client.get('photos/2020-01-01/set_A/device_1/camera_1/20200101_094359.123456_000001.jpeg') assert response.status_code == HTTPStatus.OK # Check response contents