(self)
| 134 | ) |
| 135 | |
| 136 | def test_get_images_exception(self): |
| 137 | self.pipeline.min_width = 100 |
| 138 | self.pipeline.min_height = 100 |
| 139 | |
| 140 | _, buf1 = _create_image("JPEG", "RGB", (50, 50), (0, 0, 0)) |
| 141 | _, buf2 = _create_image("JPEG", "RGB", (150, 50), (0, 0, 0)) |
| 142 | _, buf3 = _create_image("JPEG", "RGB", (50, 150), (0, 0, 0)) |
| 143 | |
| 144 | resp1 = Response(url="https://dev.mydeco.com/mydeco.gif", body=buf1.getvalue()) |
| 145 | resp2 = Response(url="https://dev.mydeco.com/mydeco.gif", body=buf2.getvalue()) |
| 146 | resp3 = Response(url="https://dev.mydeco.com/mydeco.gif", body=buf3.getvalue()) |
| 147 | req = Request(url="https://dev.mydeco.com/mydeco.gif") |
| 148 | |
| 149 | with pytest.raises(ImageException): |
| 150 | next(self.pipeline.get_images(response=resp1, request=req, info=object())) |
| 151 | with pytest.raises(ImageException): |
| 152 | next(self.pipeline.get_images(response=resp2, request=req, info=object())) |
| 153 | with pytest.raises(ImageException): |
| 154 | next(self.pipeline.get_images(response=resp3, request=req, info=object())) |
| 155 | |
| 156 | def test_get_images(self): |
| 157 | self.pipeline.min_width = 0 |
nothing calls this directly
no test coverage detected