[PATCH V1] Add another way to download the debugreport file in the test

Two urls are provided to download the files and we need test both --- tests/test_rest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_rest.py b/tests/test_rest.py index ca96dc0..b2f2c6b 100644 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -1460,6 +1460,10 @@ class RestTests(unittest.TestCase): self.assertEquals(200, resp.status) resp = request(host, port, '/debugreports/report1/content') self.assertEquals(200, resp.status) + resp = request(host, port, '/debugreports/report1') + debugre = json.loads(resp.read()) + resp = request(host, port, debugre['file']) + self.assertEquals(200, resp.status) def test_host(self): resp = self.request('/host').read() -- 1.8.1.4

Reviewed-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> On 02/26/2014 05:14 PM, Shu Ming wrote:
Two urls are provided to download the files and we need test both --- tests/test_rest.py | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/tests/test_rest.py b/tests/test_rest.py index ca96dc0..b2f2c6b 100644 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -1460,6 +1460,10 @@ class RestTests(unittest.TestCase): self.assertEquals(200, resp.status) resp = request(host, port, '/debugreports/report1/content') self.assertEquals(200, resp.status) + resp = request(host, port, '/debugreports/report1') + debugre = json.loads(resp.read()) + resp = request(host, port, debugre['file']) + self.assertEquals(200, resp.status)
def test_host(self): resp = self.request('/host').read()
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

Applied. Thanks. Regards, Aline Manera
participants (3)
-
Aline Manera
-
Sheldon
-
Shu Ming