mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-26 19:43:58 +03:00
12 lines
260 B
Python
12 lines
260 B
Python
|
from unittest import mock
|
||
|
|
||
|
from demo import Container
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
container = Container()
|
||
|
|
||
|
with container.api_client.override(mock.Mock()):
|
||
|
service = container.service()
|
||
|
assert isinstance(service.api_client, mock.Mock)
|