diff options
author | Tim Harder <radhermit@gmail.com> | 2019-07-23 04:48:52 -0600 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2019-07-23 05:27:17 -0600 |
commit | c86c94e1e77de38c84b722723b279ece33479876 (patch) | |
tree | 45c560f12bcb63e26e654ae91ce876e9b86edc1e /tests/test_gpg.py | |
parent | pmaint regen: force usage of unfiltered repos when removing old cache entries (diff) | |
download | pkgcore-c86c94e1e77de38c84b722723b279ece33479876.tar.gz pkgcore-c86c94e1e77de38c84b722723b279ece33479876.tar.bz2 pkgcore-c86c94e1e77de38c84b722723b279ece33479876.zip |
tests: move module unit tests into their own directory
To provide separation for future integration and benchmark tests in
relation to unit tests.
Diffstat (limited to 'tests/test_gpg.py')
-rw-r--r-- | tests/test_gpg.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/test_gpg.py b/tests/test_gpg.py deleted file mode 100644 index d25e2cca..00000000 --- a/tests/test_gpg.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright: 2006 Brian Harring <ferringb@gmail.com> -# License: GPL2/BSD - -from pkgcore import gpg - - -class TestSkipSignatures(object): - - def test_simple_skipping(self): - for header in ( - [], - ["-----BEGIN PGP SIGNED MESSAGE-----\n", "Hash: Sha1\n", "\n"]): - d = [ - "asdf\n", - "fdsa\n", - "-----BEGIN PGP SIGNATURE-----\n", - "this isn't a valid sig...\n", - "-----END PGP SIGNATURE-----\n", - "foon\n"] - d2 = header + d - parsed = list(gpg.skip_signatures(d2)) - required = [d[0], d[1], d[-1]] - assert parsed == required, f"{parsed!r} != {required!r} for header {header!r}" - - def test_signed_signed(self): - d = [ - "-----BEGIN PGP SIGNED MESSAGE-----\n", - "Hash: SHA1\n", - "\n", - "- -----BEGIN PGP SIGNED MESSAGE-----\n", - "Hash: SHA1\n", - "\n", - "blah\n", - "- -----BEGIN PGP SIGNATURE-----\n", - "Version: GnuPG v1.4.3 (GNU/Linux)\n", - "\n", - "iD8DBQFEViv+aGfFFLhbXWkRAo+lAJ93s57QA2lW5BE1FdmEc3uzijpJrwCfcE6j", - "3Nzn/8wExwZ5eUacC/HoSo8=", - "=oBur", - "- -----END PGP SIGNATURE-----\n", - "foon\n", - "-----BEGIN PGP SIGNATURE-----\n", - " not valid...\n", - "-----END PGP SIGNATURE-----\n", - "asdf\n"] - assert list(gpg.skip_signatures(d)) == ["blah\n", "foon\n", "asdf\n"] |