(self)
| 610 | assert headers['User-Agent'] == expected |
| 611 | |
| 612 | def test_custom_user_agent(self): |
| 613 | client = APIClient( |
| 614 | user_agent='foo/bar', |
| 615 | version=DEFAULT_DOCKER_API_VERSION) |
| 616 | client.version() |
| 617 | |
| 618 | assert self.mock_send.call_count == 1 |
| 619 | headers = self.mock_send.call_args[0][0].headers |
| 620 | assert headers['User-Agent'] == 'foo/bar' |
| 621 | |
| 622 | |
| 623 | class DisableSocketTest(unittest.TestCase): |