Example #1
0
 def test_bad(self):
   f = StringIO.StringIO('hogehoge\nzooba\n')
   v = Validator()
   try:
     h= v.validate(f)
     self.assert_(False)
   except ValueError:
     pass
Example #2
0
 def test_too_long(self):
   f = StringIO.StringIO('hoge\n'*10)
   v = Validator(max_size=10)
   try:
     v.validate(f)
     self.assert_(False)
   except ValueError:
     pass
Example #3
0
 def test_1857680(self):
   f = open('bglib/record/snowietxt/1857680.txt')
   v = Validator()
   h = v.validate(f)
   self.assertEqual(h.hexdigest(),
                    'a1d23325d0c8a614756529de960e4e7bdc1f6737')