summaryrefslogtreecommitdiff
path: root/python/samba/tests/dcerpc/lsa_utils.py
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2024-06-12 11:14:42 +1200
committerAndrew Bartlett <abartlet@samba.org>2024-06-12 08:14:34 +0000
commit2dc111b4c186d102b6b4ebdc50778ccb1cf58e36 (patch)
tree61b1a8e2b467dcc79612dcb8b73aa7733c06dcbd /python/samba/tests/dcerpc/lsa_utils.py
parentb253b4e0edac16aeb4d04b82b5332e36b6ff4149 (diff)
downloadsamba-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.py8
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)