| 54 | |
| 55 | |
| 56 | class TestPathMappingApplied: |
| 57 | def test_container_path_is_remapped(self, client, monkeypatch, reset_queue): |
| 58 | """Container path /tv → host path /Volumes/TV must be applied before queuing.""" |
| 59 | monkeypatch.setattr(subgen, "procaddedmedia", True) |
| 60 | monkeypatch.setattr(subgen, "use_path_mapping", True) |
| 61 | monkeypatch.setattr(subgen, "path_mapping_from", "/tv") |
| 62 | monkeypatch.setattr(subgen, "path_mapping_to", "/Volumes/TV") |
| 63 | monkeypatch.setattr(subgen, "has_audio", lambda path: True) |
| 64 | monkeypatch.setattr(subgen, "should_skip_file", lambda path, lang, audio_langs=None: False) |
| 65 | monkeypatch.setattr(subgen, "choose_transcribe_language", lambda path, lang, audio_tracks=None: lang) |
| 66 | monkeypatch.setattr(subgen, "should_whisper_detect_audio_language", False) |
| 67 | |
| 68 | client.post( |
| 69 | "/tautulli", |
| 70 | headers={"source": "Tautulli"}, |
| 71 | json={"event": "added", "file": "/tv/show.mkv"}, |
| 72 | ) |
| 73 | |
| 74 | queued = reset_queue.get_queued_tasks() |
| 75 | assert len(queued) == 1 |
| 76 | assert "/Volumes/TV/show.mkv" in queued[0] |
| 77 | |
| 78 | |
| 79 | class TestEmbyQueuesTask: |
nothing calls this directly
no outgoing calls
no test coverage detected