[tracker/rss-enclosures] functional-test: add 'ask' method in the store helper for the tests



commit e38cd8667584eaf7a958900236286e730edafeaa
Author: Ivan Frade <ivan frade nokia com>
Date:   Wed Oct 20 13:31:15 2010 +0300

    functional-test: add 'ask' method in the store helper for the tests

 tests/functional-tests/common/utils/helpers.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/helpers.py b/tests/functional-tests/common/utils/helpers.py
index 0431dc2..0e69c62 100644
--- a/tests/functional-tests/common/utils/helpers.py
+++ b/tests/functional-tests/common/utils/helpers.py
@@ -126,6 +126,20 @@ class StoreHelper:
             return -1
 
 
+    def ask (self, ask_query):
+        assert ask_query.strip ().startswith ("ASK")
+        result = self.query (ask_query)
+        assert len (result) == 1
+        if result[0][0] == "1":
+            return True
+        elif result[0][0] == "0":
+            return False
+        else:
+            raise Exception ("Something fishy is going on")
+            
+        
+
+        
 class MinerHelper ():
 
     def __init__ (self):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]