testing.unit.test_gpg module

class testing.unit.test_gpg.GPGSMTest(methodName='runTest')[source]

Bases: GPGTest

Test compatibility with ‘gpgsm’ the GnuPG tool for S/MIME

_classSetupFailed = False
_class_cleanups = []
encrypt_key1 = '0x0F1ABB99'
encrypt_key2 = '0xBEC52982'
pytestmark = [Mark(name='usefixtures', args=('redirect_stdin',), kwargs={})]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

sign_key = None
sign_passphrase = None
tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

class testing.unit.test_gpg.GPGTest(methodName='runTest')[source]

Bases: UnitTestCase

Test GPGFile

_classSetupFailed = False
_class_cleanups = []
gpg_cycle(s, profile=None)[source]

Test encryption/decryption cycle on string s

pytestmark = [Mark(name='usefixtures', args=('redirect_stdin',), kwargs={})]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_GPGWriteFile()[source]

Test GPGWriteFile

test_GzipWriteFile()[source]

Test GzipWriteFile

test_gpg1()[source]

Test gpg short strings

test_gpg2()[source]

Test gpg long strings easily compressed

test_gpg3()[source]

Test on random data - must have /dev/urandom device

test_gpg_asym()[source]

Test GPG asymmetric encryption

test_gpg_hidden_asym()[source]

Test GPG asymmetric encryption with hidden key id

test_gpg_signing()[source]

Test to make sure GPG reports the proper signature key

test_gpg_signing_and_hidden_encryption()[source]

Test to make sure GPG reports the proper signature key even with hidden encryption key id

class testing.unit.test_gpg.GPGWriteFile_Helper[source]

Bases: object

Used in test_GPGWriteFile above

__init__()[source]
__next__()[source]
get_buffer(size)[source]

Return buffer of size size, consisting of half random data

get_read_size()[source]
set_at_end()[source]

Iterator stops when you call this

class testing.unit.test_gpg.GPGWriteHelper2(data)[source]

Bases: object

__init__(data)[source]
class testing.unit.test_gpg.SHATest(methodName='runTest')[source]

Bases: UnitTestCase

Test making sha signatures

_classSetupFailed = False
_class_cleanups = []
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_sha()[source]