Exemple #1
0
    def test_strings_can_be_converted_to_bytes(self):
        s = provider.random_urlsafe_str()
        self.assertIsInstance(s, six.text_type)

        b = provider.random_urlsafe_str_to_bytes(s)
        self.assertIsInstance(b, six.binary_type)
    def test_strings_can_be_converted_to_bytes(self):
        s = provider.random_urlsafe_str()
        self.assertTrue(isinstance(s, six.string_types))

        b = provider.random_urlsafe_str_to_bytes(s)
        self.assertTrue(isinstance(b, bytes))