MCPcopy
hub / github.com/scrapy/scrapy / test_copy

Method test_copy

tests/test_http_response_text.py:627–641  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

625 response_class = CustomResponse
626
627 def test_copy(self):
628 super().test_copy()
629 r1 = self.response_class(
630 url="https://example.org",
631 status=200,
632 foo="foo",
633 bar="bar",
634 lost="lost",
635 )
636 r2 = r1.copy()
637 assert isinstance(r2, self.response_class)
638 assert r1.foo == r2.foo
639 assert r1.bar == r2.bar
640 assert r1.lost == "lost"
641 assert r2.lost is None
642
643 def test_replace(self):
644 super().test_replace()

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected