diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-04-27 18:00:16 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-05-05 12:27:20 -0400 |
commit | 162213fa1a4551bd955134c97ca5276a5f29e907 (patch) | |
tree | 5a70c153853fa2114c7f67523cb59db63ecfc5d8 /tests/pkey.py | |
parent | 9ece9fcc8d8e5d22de0a65fcc44374a53c31dfdb (diff) |
Migrate rest of main keys and update suite to be more pytest-relaxed compat
Main branch as of today:
350 passed, 21 skipped, 52 deselected, 3 warnings in 11.10s
This branch as of this commit:
361 passed, 21 skipped, 52 deselected, 3 warnings in 10.51s
Of those 11 "new" tests, 8 are ones I wrote (tests/pkey.py). Hard to
figure out what the other 3 are given pytest-relaxed's output is very
different from regular verbose pytest. oops.
Diffstat (limited to 'tests/pkey.py')
-rw-r--r-- | tests/pkey.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pkey.py b/tests/pkey.py new file mode 100644 index 00000000..b1cba825 --- /dev/null +++ b/tests/pkey.py @@ -0,0 +1,13 @@ +from paramiko import PKey + + +class PKey_: + class from_type_string: + def loads_from_type_and_bytes(self, key): + obj = PKey.from_type_string(key.full_type, key.pkey.asbytes()) + assert obj == key.pkey + + class from_path: + def loads_from_file_path(self, key): + obj = PKey.from_path(key.path) + assert obj == key.pkey |