fix(tests): import the mock submodule the deploy-container suite uses

test_container.py decorates with @unittest.mock.patch but imports only
unittest. A submodule is not bound as an attribute by importing its
package, so the name resolves only while some other module in the same
interpreter has already imported unittest.mock.

That makes the defect invisible in a full run, where another suite
imports it first, and fatal under a narrow INFINITO_TEST_PATTERN or on
an xdist worker that receives this file alone: collection dies with
AttributeError: module 'unittest' has no attribute 'mock'.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-10-14 00:00:41 +02:00
1 parent 14ed5600c7
commit 944a228ffb
1 file changed
+1
@@ -2,6 +2,7 @@ import os
import subprocess
import sys
import unittest
import unittest.mock
from cli.administration.deploy.container import command as deploy_container