Contact: fumanchu@aminus.org

Log in as guest/dejavu to create tickets

I think I've seen this ORM somewhere before...

root/trunk/storage/test_storage.py

Revision 62 (checked in by fumanchu, 8 years ago)

1. Tests added for CachingProxy?, BurnedProxy?.
2. Edit tests added to zoo_fixture.py
3. Bug fixed in CachingProxy?.save (should not have checked dirty).
4. CachingProxy? now holds current Timer and cancels it on shutdown.

Line 
1 from dejavu.storage import zoo_fixture, CachingProxy
2
3 def run_tests():
4     pword = raw_input("Password for the mysql root user:")
5     opts = {"host": "localhost",
6             "db": "dejavu_test",
7             "user": "root",
8             "passwd": pword,
9             }
10    
11     proxyopts = {'Next Store': 'mysql',
12                  'Lifetime': '10 minutes',
13                  }
14     zoo = zoo_fixture.zoo
15     zoo.arena.add_store('mysql', 'dejavu.storage.storemysql.StorageManagerMySQL', opts)
16     zoo_fixture.run_tests("dejavu.storage.ProxyStorage", proxyopts)
17    
18     zoo.arena.add_store('mysql', 'dejavu.storage.storemysql.StorageManagerMySQL', opts)
19     zoo_fixture.run_tests("dejavu.storage.CachingProxy", proxyopts)
20    
21     zoo.arena.add_store('mysql', 'dejavu.storage.storemysql.StorageManagerMySQL', opts)
22     zoo_fixture.run_tests("dejavu.storage.BurnedProxy", proxyopts)
23
24
25 if __name__ == "__main__":
26     run_tests()
27
Note: See TracBrowser for help on using the browser.