(self)
| 101 | assert args[0][0] == f"{url_prefix}networks/{network_id}" |
| 102 | |
| 103 | def test_inspect_network(self): |
| 104 | network_id = 'abc12345' |
| 105 | network_name = 'foo' |
| 106 | network_data = { |
| 107 | 'name': network_name, |
| 108 | 'id': network_id, |
| 109 | 'driver': 'bridge', |
| 110 | 'containers': {}, |
| 111 | } |
| 112 | |
| 113 | network_response = response(status_code=200, content=network_data) |
| 114 | get = mock.Mock(return_value=network_response) |
| 115 | |
| 116 | with mock.patch('docker.api.client.APIClient.get', get): |
| 117 | result = self.client.inspect_network(network_id) |
| 118 | assert result == network_data |
| 119 | |
| 120 | args = get.call_args |
| 121 | assert args[0][0] == f"{url_prefix}networks/{network_id}" |
| 122 | |
| 123 | def test_connect_container_to_network(self): |
| 124 | network_id = 'abc12345' |
nothing calls this directly
no test coverage detected