MCPcopy
hub / github.com/photonixapp/photonix / photo_fixture_raw

Function photo_fixture_raw

tests/test_raw_processing.py:56–71  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

54
55@pytest.fixture
56def photo_fixture_raw(db):
57 from photonix.photos.utils.db import record_photo
58 photo_index = 4 # Photo selected because it doesn't have width and height metadata
59 raw_photo_path = str(Path(__file__).parent / 'photos' / PHOTOS[photo_index][0])
60
61 if not os.path.exists(raw_photo_path):
62 urls = PHOTOS[photo_index][3]
63 for url in urls:
64 try:
65 download_file(url, raw_photo_path)
66 break
67 except:
68 pass
69
70 library = LibraryFactory()
71 return record_photo(raw_photo_path, library)
72
73
74def test_task_raw_processing(photo_fixture_raw):

Callers

nothing calls this directly

Calls 3

download_fileFunction · 0.90
record_photoFunction · 0.90
LibraryFactoryClass · 0.85

Tested by

no test coverage detected