Skip to content

Commit 48c84a8

Browse files
committed
Loosen high-level mech requirements
In particular, sasl names and descriptions can be empty for some mechanisms (NTLM in particular); do not fail the test suite because they are empty. Signed-off-by: Alexander Scheel <[email protected]>
1 parent 335156e commit 48c84a8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

gssapi/tests/test_high_level.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,18 +380,16 @@ def test_indicate_mechs(self):
380380
@ktu.gssapi_extension_test('rfc5801', 'RFC 5801: SASL Names')
381381
def test_sasl_properties(self):
382382
mechs = gssmechs.Mechanism.all_mechs()
383-
encoding = gssutils._get_encoding()
384383
for mech in mechs:
385384
s = str(mech)
386385
s.shouldnt_be_empty()
387386
s.should_be_a(str)
388-
s.should_be(mech._saslname.mech_name.decode(encoding))
389387

390-
mech.sasl_name.shouldnt_be_empty()
391-
mech.sasl_name.should_be_a(six.text_type)
388+
if mech.sasl_name:
389+
mech.sasl_name.should_be_a(six.text_type)
392390

393-
mech.description.shouldnt_be_empty()
394-
mech.description.should_be_a(six.text_type)
391+
if mech.description:
392+
mech.description.should_be_a(six.text_type)
395393

396394
cmp_mech = gssmechs.Mechanism.from_sasl_name(mech.sasl_name)
397395
str(cmp_mech).should_be(str(mech))

0 commit comments

Comments
 (0)