(self)
| 601 | self.patcher.stop() |
| 602 | |
| 603 | def test_default_user_agent(self): |
| 604 | client = APIClient(version=DEFAULT_DOCKER_API_VERSION) |
| 605 | client.version() |
| 606 | |
| 607 | assert self.mock_send.call_count == 1 |
| 608 | headers = self.mock_send.call_args[0][0].headers |
| 609 | expected = f'docker-sdk-python/{docker.__version__}' |
| 610 | assert headers['User-Agent'] == expected |
| 611 | |
| 612 | def test_custom_user_agent(self): |
| 613 | client = APIClient( |