[tests] Use real paths module in testing

This avoids problems of mock paths having different API that the real
ones.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-02-11 15:15:36 +01:00
parent 8661d294ab
commit 90954ddf0e
9 changed files with 203 additions and 211 deletions

View file

@ -383,3 +383,11 @@ def get_volid(compose, arch, variant=None, escape_spaces=False, disc_type=False)
if volid and escape_spaces:
volid = volid.replace(" ", r"\x20")
return volid
def get_mtime(path):
return int(os.stat(path).st_mtime)
def get_file_size(path):
return os.path.getsize(path)