diff options
author | makkalot <makkalot@gmail.com> | 2008-07-18 14:41:10 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-07-18 14:41:10 +0300 |
commit | 701f5523a79bfb8d9ab34565db9e08eca15e1ac3 (patch) | |
tree | 97544067869b5db17ea220cf98ac421dfa52a1fd /funcweb/funcweb/tests | |
parent | 116c27c28724f38f3d84d42f6d57b5308ad7f895 (diff) | |
download | func-701f5523a79bfb8d9ab34565db9e08eca15e1ac3.tar.gz func-701f5523a79bfb8d9ab34565db9e08eca15e1ac3.tar.xz func-701f5523a79bfb8d9ab34565db9e08eca15e1ac3.zip |
some beautiful test cases for async manager class, code is more beatiful with lots of test cases :)
Diffstat (limited to 'funcweb/funcweb/tests')
-rw-r--r-- | funcweb/funcweb/tests/test_async_tools.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/funcweb/funcweb/tests/test_async_tools.py b/funcweb/funcweb/tests/test_async_tools.py new file mode 100644 index 0000000..4296a9e --- /dev/null +++ b/funcweb/funcweb/tests/test_async_tools.py @@ -0,0 +1,38 @@ +from funcweb.async_tools import AsyncResultManager +from func.overlord.client import Overlord +import unittest + +class TestAsyncResultManager(unittest.TestCase): + + def setUp(self): + self.fc = Overlord("*") + self.async_manager = AsyncResultManager() + + def test_get_current_list(self): + pass + + def test_update_current_list(self): + pass + + def test_check_for_changes(self): + pass + + def test_select_from(self): + pass + + def test_job_id_result(self): + pass + + def test_current_db(self): + #that test also test the test_get_current_list with no changes option + + result_ids = self.fc.open_job_ids() + manual_list = {} + for job_id,code in result_ids.iteritems(): + manual_list[job_id]=[code,self.async_manager.JOB_CODE_NEW] + + real_result =self.async_manager.current_db() + #print real_result + assert manual_list ==real_result + + |