def test_gpg_functions(self):
        """Signing, key export and util functions must raise on missing gpg. """
        with self.assertRaises(UnsupportedLibraryError) as ctx:
            create_signature('bar')
        self.assertEqual(NO_GPG_MSG, str(ctx.exception))

        with self.assertRaises(UnsupportedLibraryError) as ctx:
            export_pubkey('f00')
        self.assertEqual(NO_GPG_MSG, str(ctx.exception))

        with self.assertRaises(UnsupportedLibraryError) as ctx:
            get_version()
        self.assertEqual(NO_GPG_MSG, str(ctx.exception))
예제 #2
0
 def test_version_utils_return_types(self):
   """Run dummy tests for coverage. """
   self.assertTrue(isinstance(get_version(), string_types))
   self.assertTrue(isinstance(is_version_fully_supported(), bool))