We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65d3513 commit 335a245Copy full SHA for 335a245
1 file changed
tests/unit/providers/test_container_py2_py3.py
@@ -264,3 +264,17 @@ def test_resolve_provider_name_no_provider():
264
container = providers.Container(Core)
265
with raises(errors.Error):
266
container.resolve_provider_name(providers.Provider())
267
+
268
+def test_subcontainer_wiring():
269
+ class SC(containers.DeclarativeContainer):
270
+ wiring_config = containers.WiringConfiguration(modules=["samples.wiring.module"])
271
272
+ subcontainer = SC()
273
+ assert len(subcontainer.wired_to_modules) == 1
274
275
+ class PC(containers.DeclarativeContainer):
276
+ subcontainer = providers.Container(SC)
277
278
+ parentcontainer = PC()
279
280
+ assert len(parentcontainer.subcontainer().wired_to_modules) == 1
0 commit comments