diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2024-06-12 11:14:42 +1200 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2024-06-12 08:14:34 +0000 |
| commit | 2dc111b4c186d102b6b4ebdc50778ccb1cf58e36 (patch) | |
| tree | 61b1a8e2b467dcc79612dcb8b73aa7733c06dcbd /python/samba/tests/dcerpc/lsa_utils.py | |
| parent | b253b4e0edac16aeb4d04b82b5332e36b6ff4149 (diff) | |
| download | samba-2dc111b4c186d102b6b4ebdc50778ccb1cf58e36.tar.gz samba-2dc111b4c186d102b6b4ebdc50778ccb1cf58e36.tar.bz2 samba-2dc111b4c186d102b6b4ebdc50778ccb1cf58e36.zip | |
pytest: remove py2 str/bytes workaround in lsa_utils
It is likely not necessary to cast to list() in most cases.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/tests/dcerpc/lsa_utils.py')
| -rw-r--r-- | python/samba/tests/dcerpc/lsa_utils.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/python/samba/tests/dcerpc/lsa_utils.py b/python/samba/tests/dcerpc/lsa_utils.py index d6da5eb60bd..229f57ec546 100644 --- a/python/samba/tests/dcerpc/lsa_utils.py +++ b/python/samba/tests/dcerpc/lsa_utils.py @@ -107,9 +107,7 @@ class CreateTrustedDomain(TestCase): info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL info.trust_attributes = lsa.LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE - password_blob = samba.string_to_byte_array( - "password".encode('utf-16-le') - ) + password_blob = list("password".encode('utf-16-le')) clear_value = drsblobs.AuthInfoClear() clear_value.size = len(password_blob) @@ -198,9 +196,7 @@ class CreateTrustedDomain(TestCase): info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL info.trust_attributes = lsa.LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE - password_blob = samba.string_to_byte_array( - "password".encode('utf-16-le') - ) + password_blob = list("password".encode('utf-16-le')) clear_value = drsblobs.AuthInfoClear() clear_value.size = len(password_blob) |
