Beispiel #1
0
    def test_pseudo(self):
        self.assertRaises(NotImplementedError, partial(random, 1, path='/xxx/xxx/xxx'))
        expected_len = 5
        actual_len = len(random(expected_len, allow_pseudo=True, path='/xxx/xxx/xxx'))
        self.assertEqual(expected_len, actual_len)

        expected_len = 6
        actual_len = len(urandom(expected_len))
        self.assertEqual(expected_len, actual_len)
Beispiel #2
0
    def test_pseudo(self):
        self.assertRaises(NotImplementedError,
                          partial(random, 1, path='/xxx/xxx/xxx'))
        expected_len = 5
        actual_len = len(
            random(expected_len, allow_pseudo=True, path='/xxx/xxx/xxx'))
        self.assertEqual(expected_len, actual_len)

        expected_len = 6
        actual_len = len(urandom(expected_len))
        self.assertEqual(expected_len, actual_len)
Beispiel #3
0
 def test_number_of_chars(self):
     expected_len = 5
     actual_len = len(random(expected_len))
     self.assertEqual(expected_len, actual_len)
Beispiel #4
0
 def test_number_of_chars(self):
     expected_len = 5
     actual_len = len(random(expected_len))
     self.assertEqual(expected_len, actual_len)