(db)
| 54 | |
| 55 | @pytest.fixture |
| 56 | def 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 | |
| 74 | def test_task_raw_processing(photo_fixture_raw): |
nothing calls this directly
no test coverage detected