Exemple #1
0
 def test__asbool_False(self):
     from repoze.vhm.middleware import asbool
     for obj in ['false', 'no', 'off', 'n', 'f', '0']:
         self.assertEqual(asbool(obj), False)
Exemple #2
0
 def test__noop(self):
     from repoze.vhm.middleware import asbool
     self.assertTrue(asbool({1: 2}))
 def test__noop(self):
     from repoze.vhm.middleware import asbool
     self.assertTrue(asbool({1:2}))
Exemple #4
0
 def test__asbool_True(self):
     from repoze.vhm.middleware import asbool
     for obj in ['true', 'yes', 'on', 'y', 't', '1']:
         self.assertEqual(asbool(obj), True)
 def test__asbool_False(self):
     from repoze.vhm.middleware import asbool
     for obj in ['false', 'no', 'off', 'n', 'f', '0']:
         self.assertEqual(asbool(obj), False)
 def test__asbool_True(self):
     from repoze.vhm.middleware import asbool
     for obj in ['true', 'yes', 'on', 'y', 't', '1']:
         self.assertEqual(asbool(obj), True)
 def test__noop(self):
     self.assertTrue(asbool({1:2}))
 def test__asbool_False(self):
     for obj in ['false', 'no', 'off', 'n', 'f', '0']:
         self.assertEqual(asbool(obj), False) 
 def test__asbool_True(self):
     for obj in ['true', 'yes', 'on', 'y', 't', '1']:
         self.assertEqual(asbool(obj), True)