Skip to content

Commit 49dd0fa

Browse files
author
WN
committed
review fixes
1 parent 6283500 commit 49dd0fa

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tests/test_ssl.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,16 +519,23 @@ def test_set_cipher_list(self, context, cipher_string):
519519

520520
assert "AES128-SHA" in conn.get_cipher_list()
521521

522-
@pytest.mark.parametrize(
523-
"set_cipher_method", ["set_cipher_list", "set_ciphersuites"]
524-
)
525-
def test_set_cipher_wrong_type(self, context, set_cipher_method):
522+
523+
def test_set_cipher_wrong_type(self, context):
526524
"""
527-
`Context.set_cipher_list` and `Context.set_ciphersuites`
528-
raises `TypeError` when passed a non-string argument.
525+
`Context.set_cipher_list` raises `TypeError` when
526+
passed a non-string argument.
529527
"""
530528
with pytest.raises(TypeError):
531-
getattr(context, set_cipher_method)(object())
529+
context.set_cipher_list(object())
530+
531+
def test_set_ciphersuites_wrong_type(self, context):
532+
"""
533+
`Context.set_ciphersuites` raises `TypeError` when
534+
passed a non-string argument.
535+
"""
536+
with pytest.raises(TypeError):
537+
context.set_ciphersuites(object())
538+
532539

533540
@pytest.mark.flaky(reruns=2)
534541
def test_set_cipher_list_no_cipher_match(self, context):

0 commit comments

Comments
 (0)