Exemplo n.º 1
0
    def testGenerate(self):
        self.assertEqual(len(key.generate(6)), 6, 'key size')

        for c in key.generate(100):
            self.assertIn(c, ('abcdefghijklmnopqrstuvwxyz'
                              'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
                              '0123456789'),
                          'key in range')