import repository from arizona
[raven.git] / 2.0 / python / test / storkverifysignedfileTest.py
1 """
2 <Module>
3    storkverifysignedfileTest
4
5 <Author>
6    Collin Reynolds
7
8 <Started>
9    October 23, 2007
10
11 <Purpose>
12    Test module for storkverifysignedfile.py
13 """
14
15 import arizonaunittest
16 import arizonaconfig
17 import arizonareport
18 import os
19 import storkverifysignedfile
20
21 class test(arizonaunittest.TestCase):
22
23    #-------------------------------------------
24    # main()
25    #-------------------------------------------
26    def test_main(self):
27       pass
28
29
30
31
32
33    #--------------------------------------------
34    # move_file(src,dst)
35    #--------------------------------------------                
36    def test_move_file(self):
37       storkverifysignedfile.move_file("test/test.txt","test/test.txt")
38       self.assertException(SystemExit,storkverifysignedfile.move_file,"","")
39       self.assertEqual(arizonareport.message,"dir: " + arizonaconfig.get_option("endfiledir") + " does not exist")
40    
41    
42    
43    
44    #---------------------------------------------
45    # verify_file(filename, path)
46    #---------------------------------------------   
47    def test_verify_file(self):
48       #This fails for some reason
49       timestamp = storkverifysignedfile.verify_file("test.txt", "test")
50       self.assertEqual(timestamp,0)
51       
52       
53       
54       
55
56 if __name__=='__main__':
57    arizonaconfig.init_options()
58    arizonaunittest.main()