From fc17f3568c985e6a3441fd814d9142952b0cb761 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 22 Jul 2013 23:25:18 +0200 Subject: little cleanup, added some tests --- tests/other/test_requestFactory.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/other') diff --git a/tests/other/test_requestFactory.py b/tests/other/test_requestFactory.py index 734d9c1fb..751e7f03b 100644 --- a/tests/other/test_requestFactory.py +++ b/tests/other/test_requestFactory.py @@ -17,6 +17,9 @@ class TestRequestFactory: new_req = self.req.getRequest(req.getContext()) assert new_req.getContext() == req.getContext() + cj = CurlRequest.CONTEXT_CLASS() + assert self.req.getRequest(cj).context is cj + def test_get_request_class(self): self.req.getRequest(None, CurlRequest) @@ -26,5 +29,10 @@ class TestRequestFactory: dl.close() # with given request - dl = self.req.getDownloadRequest(self.req.getRequest()) + req = self.req.getRequest() + dl = self.req.getDownloadRequest(req) + + assert req.context is dl.context + assert req.options is dl.options + dl.close() \ No newline at end of file -- cgit v1.2.3