l.s.g.t.t.TestGPGHandler(TestCase) : class documentation

Part of lp.services.gpg.tests.test_gpghandler View In Hierarchy

Unit tests for the GPG handler.
Method setUp Get a gpghandler and login
Method tearDown Zero out the gpg database
Method populateKeyring Undocumented
Method testEmptyGetKeys The initial local key list should be empty.
Method testPopulatedGetKeys Import our test keys and check they get imported.
Method testFilteredGetKeys Check the filtered key lookup mechanism.
Method test_unicode_filter Using a unicode filter works also.
Method test_non_ascii_filter localKeys should not error if passed non-ascii unicode strings.
Method testTestkeyrings Do we have the expected test keyring files
Method test_retrieveKey_raises_GPGKeyDoesNotExistOnServer Undocumented
Method test_retrieveKey_raises_GPGKeyTemporarilyNotFoundError_for_timeout Undocumented
Method test_retrieveKey_checks_fingerprint Undocumented
Method test_retrieveKey_allows_subkey Undocumented
Method test_retrieveKey_allows_64bit_key_id Undocumented
Method test_retrieveKey_checks_64bit_key_id Undocumented
Method test_retrieveKey_forbids_32bit_key_id Undocumented
Method test_uploadPublicKey_suppress_in_config Undocumented
Method test_getURLForKeyInServer_default Undocumented
Method test_getURLForKeyInServer_different_action Undocumented
Method test_getURLForKeyInServer_public_http Undocumented
Method test_getURLForKeyInServer_public_https Undocumented
Method test_signContent_uses_sha512_digests Undocumented

Inherited from TestCase:

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def setUp(self):
Get a gpghandler and login
def tearDown(self):
Zero out the gpg database
def populateKeyring(self):
Undocumented
def testEmptyGetKeys(self):
The initial local key list should be empty.
def testPopulatedGetKeys(self):
Import our test keys and check they get imported.
def testFilteredGetKeys(self):
Check the filtered key lookup mechanism.

Test filtering by fingerprint, key ID, UID restricted to public or secret keyrings.

def test_unicode_filter(self):
Using a unicode filter works also.

XXX michaeln 2010-05-07 bug=576405 Recent versions of gpgme return unicode fingerprints, but at the same time, gpgme.Context().keylist falls over if it receives a unicode string.

def test_non_ascii_filter(self):
localKeys should not error if passed non-ascii unicode strings.
def testTestkeyrings(self):
Do we have the expected test keyring files
def test_retrieveKey_raises_GPGKeyDoesNotExistOnServer(self):
Undocumented
@responses.activate
def test_retrieveKey_raises_GPGKeyTemporarilyNotFoundError_for_timeout(self):
Undocumented
def test_retrieveKey_checks_fingerprint(self):
Undocumented
def test_retrieveKey_allows_subkey(self):
Undocumented
def test_retrieveKey_allows_64bit_key_id(self):
Undocumented
def test_retrieveKey_checks_64bit_key_id(self):
Undocumented
def test_retrieveKey_forbids_32bit_key_id(self):
Undocumented
def test_uploadPublicKey_suppress_in_config(self):
Undocumented
def test_getURLForKeyInServer_default(self):
Undocumented
def test_getURLForKeyInServer_different_action(self):
Undocumented
def test_getURLForKeyInServer_public_http(self):
Undocumented
def test_getURLForKeyInServer_public_https(self):
Undocumented
def test_signContent_uses_sha512_digests(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.