'Check that encryption/decryption of the streams works.'

def testUploadWrapper(self):

    encrypted_data = ''
    while 1:
        small_read = self.encrypt_wrapper.read(2)
        if (not small_read):
            break
        self.assertTrue((len(small_read) <= 2))
        encrypted_data += small_read
        self.decrypt_wrapper.write(small_read)
    self.assertEqual(self.test_string, self.outfd.getvalue())
