Generalize the reading of test file data
authorIustin Pop <iustin@google.com>
Mon, 20 Oct 2008 18:01:28 +0000 (18:01 +0000)
committerIustin Pop <iustin@google.com>
Mon, 20 Oct 2008 18:01:28 +0000 (18:01 +0000)
commit149a54392714573f3586b55f374ec24a935fb3ea
treeca5ce07b3f58b052b0d5e0c6b14388804a87a290
parent02691904fad3df9d657d65b980dfca6893b6e3f4
Generalize the reading of test file data

Currently we have two methods in ganeti.bdev_unittest.py of computing
the test data file name - and, of course, they don't give the same
results.

The patch moves the functions to compute the test file name and reading
of its contents to the GanetiTestCase class in testutils, which allows
running the tests from the command line as well.

We also change assertFileContent to use utils.ReadFile.

Reviewed-by: imsnah
test/ganeti.bdev_unittest.py
test/testutils.py