summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2012-12-07 14:49:18 +0100
committerMichal Minar <miminar@redhat.com>2012-12-07 14:49:18 +0100
commitc0cadb3bc6b9fcdcf191fe661104cf9f35c60e95 (patch)
tree63fb568fe5217b1891281ff7c77719e825f224ac /src
parente1772137de5be91aba29fc3920861b26c1f7a4fb (diff)
downloadopenlmi-providers-c0cadb3bc6b9fcdcf191fe661104cf9f35c60e95.tar.gz
openlmi-providers-c0cadb3bc6b9fcdcf191fe661104cf9f35c60e95.tar.xz
openlmi-providers-c0cadb3bc6b9fcdcf191fe661104cf9f35c60e95.zip
comply with nosetests rules
all methods, functions and modules including 'test' in their name and not intended to be run by nosetests renamed
Diffstat (limited to 'src')
-rw-r--r--src/software/test/README8
-rwxr-xr-xsrc/software/test/run.py (renamed from src/software/test/run_tests.py)0
-rwxr-xr-xsrc/software/test/test_software_file_check.py12
3 files changed, 10 insertions, 10 deletions
diff --git a/src/software/test/README b/src/software/test/README
index a64382d..e2b3cc6 100644
--- a/src/software/test/README
+++ b/src/software/test/README
@@ -1,4 +1,4 @@
-Tests must be run as root on machine with sfcbd broker.
+Tests must be run as root on machine with cimom broker.
There are number of environment variables, that affect test running:
LMI_CIMOM_USERNAME
LMI_CIMOM_PASSWORD
@@ -15,12 +15,12 @@ There are number of environment variables, that affect test running:
complete
Simple usage:
- Each test module can be run as a stand-alone script or with run_tests.py
+ Each test module can be run as a stand-alone script or with run.py
script:
- $ ./run_tests.py -c --cache-dir=/var/tmp
+ $ ./run.py -c --cache-dir=/var/tmp
To pass any arguments to underlying unittest.main() function, append them
after "--" swith like this:
- $ ./run_tests.py -c --cache-dir=/var/tmp -- -v TestSoftwarePackage
+ $ ./run.py -c --cache-dir=/var/tmp -- -v TestSoftwarePackage
All environment variables defined above can be overriden by command-line
arguments.
diff --git a/src/software/test/run_tests.py b/src/software/test/run.py
index 002bf77..002bf77 100755
--- a/src/software/test/run_tests.py
+++ b/src/software/test/run.py
diff --git a/src/software/test/test_software_file_check.py b/src/software/test/test_software_file_check.py
index cb09282..d44fd10 100755
--- a/src/software/test/test_software_file_check.py
+++ b/src/software/test/test_software_file_check.py
@@ -136,7 +136,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
return RE_CHECKSUM.match(subprocess.check_output([
self.hash_num2cmd[csumnum], filename])).group(1).lower()
- def do_test_symlink(self, filepath, inst):
+ def do_check_symlink(self, filepath, inst):
"""
Assert some details about symlink.
"""
@@ -199,7 +199,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
self.assertTrue(cur_pflags.gid)
self.assertTrue(cur_pflags.mtime)
- def do_test_directory(self, filepath, inst):
+ def do_check_directory(self, filepath, inst):
"""
Assert some details about directory.
"""
@@ -216,7 +216,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
self.assertEqual(inst["LastModificationTime"],
int(stats.st_mtime))
- def do_test_file(self, filepath, inst):
+ def do_check_file(self, filepath, inst):
"""
Assert some details about regurar file.
"""
@@ -340,11 +340,11 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
, "FileChecksum", "FileModeFlags"):
self.assertEqual(inst["Expected"+prop], inst[prop])
if os.path.islink(filepath):
- self.do_test_symlink(filepath, inst)
+ self.do_check_symlink(filepath, inst)
elif os.path.isdir(filepath):
- self.do_test_directory(filepath, inst)
+ self.do_check_directory(filepath, inst)
elif os.path.isfile(filepath):
- self.do_test_file(filepath, inst)
+ self.do_check_file(filepath, inst)
@common.mark_dangerous
def test_invoke_method(self):