From ec1b156cd7926e5845c8b6b16762e5fc57ea3a8b Mon Sep 17 00:00:00 2001
From: Siddharth Ravikumar <sravik@bgsu.edu>
Date: Thu, 26 Feb 2015 02:30:06 -0500
Subject: updated combox.silo.ComboxSilo.stale method - added new arg fhash

- the arg `fhash' is set to None by default.
- if `fhash' is not None, it is considered as file's current hash.

	modified:   combox/silo.py
	modified:   tests/silo_test.py
---
 tests/silo_test.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'tests')

diff --git a/tests/silo_test.py b/tests/silo_test.py
index df905b6..1a290b4 100644
--- a/tests/silo_test.py
+++ b/tests/silo_test.py
@@ -22,7 +22,7 @@ from shutil import copyfile
 from os import path, remove
 
 from combox.silo import ComboxSilo
-from combox.file import read_file, write_file
+from combox.file import read_file, write_file, hash_file
 
 from tests.utils import get_config, rm_nodedirs, rm_configdir
 
@@ -77,6 +77,7 @@ class TestSilo(object):
         write_file(self.LOREM_IPSUM, lorem_ipsum_content)
 
         assert csilo.stale(self.LOREM_IPSUM)
+        assert csilo.stale(self.LOREM_IPSUM, hash_file(self.LOREM_IPSUM))
         csilo.update(self.LOREM_IPSUM)
         assert csilo.stale(self.LOREM_IPSUM) is False
 
-- 
cgit v1.2.3