(self)
| 152 | ) |
| 153 | |
| 154 | def test_import_image_from_bytes(self): |
| 155 | stream = (i for i in range(0, 100)) |
| 156 | |
| 157 | self.client.import_image( |
| 158 | stream, |
| 159 | repository=fake_api.FAKE_REPO_NAME, |
| 160 | tag=fake_api.FAKE_TAG_NAME |
| 161 | ) |
| 162 | |
| 163 | fake_request.assert_called_with( |
| 164 | 'POST', |
| 165 | f"{url_prefix}images/create", |
| 166 | params={ |
| 167 | 'repo': fake_api.FAKE_REPO_NAME, |
| 168 | 'tag': fake_api.FAKE_TAG_NAME, |
| 169 | 'fromSrc': '-', |
| 170 | }, |
| 171 | headers={ |
| 172 | 'Content-Type': 'application/tar', |
| 173 | }, |
| 174 | data=stream, |
| 175 | timeout=DEFAULT_TIMEOUT_SECONDS |
| 176 | ) |
| 177 | |
| 178 | def test_import_image_from_image(self): |
| 179 | self.client.import_image( |
nothing calls this directly
no test coverage detected