|
9 | 9 | import pytest |
10 | 10 |
|
11 | 11 | from libtmux._internal.frozen_dataclass_sealable import is_sealable |
12 | | -from libtmux.snapshot import ( |
13 | | - PaneSnapshot, |
14 | | - ServerSnapshot, |
15 | | - SessionSnapshot, |
16 | | - WindowSnapshot, |
| 12 | +from libtmux.snapshot.models.pane import PaneSnapshot |
| 13 | +from libtmux.snapshot.models.server import ServerSnapshot |
| 14 | +from libtmux.snapshot.models.session import SessionSnapshot |
| 15 | +from libtmux.snapshot.models.window import WindowSnapshot |
| 16 | +from libtmux.snapshot.utils import ( |
17 | 17 | snapshot_active_only, |
18 | 18 | snapshot_to_dict, |
19 | 19 | ) |
@@ -173,7 +173,7 @@ def test_session_snapshot_creation(self, session: Session) -> None: |
173 | 173 |
|
174 | 174 | # Patch the from_session method to return our mock |
175 | 175 | with patch( |
176 | | - "libtmux.snapshot.SessionSnapshot.from_session", |
| 176 | + "libtmux.snapshot.models.session.SessionSnapshot.from_session", |
177 | 177 | return_value=mock_snapshot, |
178 | 178 | ): |
179 | 179 | snapshot = SessionSnapshot.from_session(session) |
@@ -212,7 +212,7 @@ def test_server_snapshot_creation(self, server: Server, session: Session) -> Non |
212 | 212 |
|
213 | 213 | # Patch the from_server method to return our mock |
214 | 214 | with patch( |
215 | | - "libtmux.snapshot.ServerSnapshot.from_server", |
| 215 | + "libtmux.snapshot.models.server.ServerSnapshot.from_server", |
216 | 216 | return_value=mock_snapshot, |
217 | 217 | ): |
218 | 218 | snapshot = ServerSnapshot.from_server(server) |
@@ -293,7 +293,7 @@ def mock_filter( |
293 | 293 | return True |
294 | 294 |
|
295 | 295 | # Apply the filter with a patch to avoid actual implementation |
296 | | - with patch("libtmux.snapshot.filter_snapshot", side_effect=lambda s, f: s): |
| 296 | + with patch("libtmux.snapshot.utils.filter_snapshot", side_effect=lambda s, f: s): |
297 | 297 | filtered = snapshot_active_only(mock_server_snap) |
298 | 298 |
|
299 | 299 | # Since we're using a mock that passes everything through, the filtered |
|
0 commit comments