Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_missing_dependencies_raise_exception():
container = Container()
container.register(MessageSpeaker, HelloWorldSpeaker)
with pytest.raises(MissingDependencyException):
container.resolve(MessageSpeaker)