Skip to content

Commit f0d6134

Browse files
author
Rakshith Bhyravabhotla
authored
tests fix (#13026)
* other fixes * p2 compat
1 parent 63513ef commit f0d6134

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
recursive-include tests *.py *.yaml
2+
recursive-include samples *.py
23
include *.md
34
include azure/__init__.py
45

sdk/eventgrid/azure-eventgrid/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
zip_safe=False,
7676
packages=find_packages(exclude=[
7777
'tests',
78+
'samples',
7879
# Exclude packages that will be covered by PEP420 or nspkg
7980
'azure',
8081
]),

sdk/eventgrid/azure-eventgrid/tests/test_eg_consumer.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"specversion":"1.0"
3737
}
3838
cloud_storage_string = json.dumps(cloud_storage_dict)
39-
cloud_storage_bytes = bytes(cloud_storage_string, "utf-8")
39+
cloud_storage_bytes = cloud_storage_string.encode("utf-8")
4040

4141
# custom cloud event
4242
cloud_custom_dict = {
@@ -48,7 +48,7 @@
4848
"specversion":"1.0"
4949
}
5050
cloud_custom_string = json.dumps(cloud_custom_dict)
51-
cloud_custom_bytes = bytes(cloud_custom_string, "utf-8")
51+
cloud_custom_bytes = cloud_custom_string.encode("utf-8")
5252

5353
# storage eg event
5454
eg_storage_dict = {
@@ -74,7 +74,7 @@
7474
}
7575

7676
eg_storage_string = json.dumps(eg_storage_dict)
77-
eg_storage_bytes = bytes(eg_storage_string, "utf-8")
77+
eg_storage_bytes = eg_storage_string.encode("utf-8")
7878

7979
# custom eg event
8080
eg_custom_dict = {
@@ -88,7 +88,7 @@
8888
"topic":"/subscriptions/f8aa80ae-d1c8-60ad-9bce-e1a850ba5b67/resourceGroups/sample-resource-group-test/providers/Microsoft.EventGrid/topics/egtopicsamplesub"
8989
}
9090
eg_custom_string = json.dumps(eg_custom_dict)
91-
eg_custom_bytes = bytes(eg_custom_string, "utf-8")
91+
eg_custom_bytes = eg_custom_string.encode("utf-8")
9292

9393
class EventGridConsumerTests(AzureMgmtTestCase):
9494

0 commit comments

Comments
 (0)