fix: set offline on the screen state in the test

This commit is contained in:
Abdessamad Derraz committed 2026-11-22 01:25:24 +01:00
1 parent 352e2bbb5e
commit 0734b01e56
1 file changed
+2 -3
+2 -3
View File
@@ -1107,9 +1107,8 @@ class OfflineAndPackLeaveOut(Scratch):
# The screen reads that summary as missing files, not failures.
state = install.TuiState()
state.summary = summary
with unittest.mock.patch.dict(os.environ,
{install.OFFLINE_VARIABLE: install.OFFLINE_FLAG_VALUE}):
title, lines = install.tui_outcome(state)
state.offline = True
title, lines = install.tui_outcome(state)
self.assertEqual(title, "Finished with files missing")
self.assertIn("1 installed, 3 not fetched (--offline).", lines[0])