diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-22 23:25:18 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-07-22 23:25:18 +0200 |
commit | fc17f3568c985e6a3441fd814d9142952b0cb761 (patch) | |
tree | 49148f259f8f68fecbe99200692228c550890b26 /tests/other | |
parent | little fix for jshint (diff) | |
download | pyload-fc17f3568c985e6a3441fd814d9142952b0cb761.tar.xz |
little cleanup, added some tests
Diffstat (limited to 'tests/other')
-rw-r--r-- | tests/other/test_requestFactory.py | 10 |
1 files changed, 9 insertions, 1 deletions
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 |