Skip to content

Commit ac5f3f1

Browse files
committed
fix sb test for 313
1 parent 51561f7 commit ac5f3f1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

azurefunctions-extensions-bindings-servicebus/tests/test_servicebus.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Licensed under the MIT License.
33

44
import unittest
5+
import sys
56
from typing import List, Optional
67

78

@@ -144,10 +145,23 @@ def test_input_invalid_datum_type(self):
144145
"Unexpected type of data received for the 'servicebus' binding: 'str'",
145146
)
146147

148+
@unittest.skipIf(sys.version_info.minor >= 13, "Python 3.13"
149+
" throws a different error.")
147150
def test_input_get_decoded_message_ex(self):
148151
with self.assertRaises(ValueError) as e:
149152
_ = get_decoded_message("Invalid message")
150153
self.assertEqual(
151154
e.exception.args[0],
152155
"Failed to decode ServiceBus content: must be str, not bytes",
153156
)
157+
158+
@unittest.skipIf(sys.version_info.minor < 13, "Python 3.13"
159+
" throws a different error.")
160+
def test_input_get_decoded_message_ex_313(self):
161+
with self.assertRaises(ValueError) as e:
162+
_ = get_decoded_message("Invalid message")
163+
self.assertEqual(
164+
e.exception.args[0],
165+
"Failed to decode ServiceBus content: "
166+
"find() argument 1 must be str, not bytes",
167+
)

0 commit comments

Comments
 (0)