-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds support for enums by converting to string before sending on the … (
#13726) * adds support for enums by converting to string before sending on the wire * forgot about considerations for python2 strings/unicode stuff
- Loading branch information
1 parent
55a1f90
commit 30c771e
Showing
3 changed files
with
229 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
187 changes: 187 additions & 0 deletions
187
...s/azure-data-tables/tests/recordings/test_table_entity.test_insert_entity_with_enums.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
interactions: | ||
- request: | ||
body: !!python/unicode '{"TableName": "uttabled43513a4"}' | ||
headers: | ||
Accept: | ||
- application/json;odata=minimalmetadata | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '32' | ||
Content-Type: | ||
- application/json;odata=nometadata | ||
DataServiceVersion: | ||
- '3.0' | ||
Date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/12.0.0b2 Python/2.7.18 (Windows-10-10.0.19041) | ||
x-ms-date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
x-ms-version: | ||
- '2019-02-02' | ||
method: POST | ||
uri: !!python/unicode https://storagename.table.core.windows.net/Tables | ||
response: | ||
body: | ||
string: !!python/unicode '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttabled43513a4"}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-type: | ||
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8 | ||
date: | ||
- Thu, 10 Sep 2020 23:51:24 GMT | ||
location: | ||
- !!python/unicode https://storagename.table.core.windows.net/Tables('uttabled43513a4') | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
transfer-encoding: | ||
- chunked | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-02-02' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: !!python/unicode '{"test1": "Color.YELLOW", "test1@odata.type": "Edm.String", | ||
"test3": "Color.RED", "test2": "Color.BLUE", "RowKey@odata.type": "Edm.String", | ||
"PartitionKey@odata.type": "Edm.String", "PartitionKey": "pkd43513a4", "test2@odata.type": | ||
"Edm.String", "test3@odata.type": "Edm.String", "RowKey": "rkd43513a4"}' | ||
headers: | ||
Accept: | ||
- application/json;odata=minimalmetadata | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '302' | ||
Content-Type: | ||
- application/json;odata=nometadata | ||
DataServiceVersion: | ||
- '3.0' | ||
Date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/12.0.0b2 Python/2.7.18 (Windows-10-10.0.19041) | ||
x-ms-date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
x-ms-version: | ||
- '2019-02-02' | ||
method: POST | ||
uri: !!python/unicode https://storagename.table.core.windows.net/uttabled43513a4 | ||
response: | ||
body: | ||
string: !!python/unicode '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled43513a4/@Element","odata.etag":"W/\"datetime''2020-09-10T23%3A51%3A25.711904Z''\"","PartitionKey":"pkd43513a4","RowKey":"rkd43513a4","Timestamp":"2020-09-10T23:51:25.711904Z","test1":"Color.YELLOW","test3":"Color.RED","test2":"Color.BLUE"}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-type: | ||
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8 | ||
date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
etag: | ||
- W/"datetime'2020-09-10T23%3A51%3A25.711904Z'" | ||
location: | ||
- !!python/unicode https://storagename.table.core.windows.net/uttabled43513a4(PartitionKey='pkd43513a4',RowKey='rkd43513a4') | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
transfer-encoding: | ||
- chunked | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-02-02' | ||
status: | ||
code: 201 | ||
message: Created | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json;odata=minimalmetadata | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
DataServiceVersion: | ||
- '3.0' | ||
Date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/12.0.0b2 Python/2.7.18 (Windows-10-10.0.19041) | ||
x-ms-date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
x-ms-version: | ||
- '2019-02-02' | ||
method: GET | ||
uri: !!python/unicode https://storagename.table.core.windows.net/uttabled43513a4(PartitionKey='pkd43513a4',RowKey='rkd43513a4') | ||
response: | ||
body: | ||
string: !!python/unicode '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttabled43513a4/@Element","odata.etag":"W/\"datetime''2020-09-10T23%3A51%3A25.711904Z''\"","PartitionKey":"pkd43513a4","RowKey":"rkd43513a4","Timestamp":"2020-09-10T23:51:25.711904Z","test1":"Color.YELLOW","test3":"Color.RED","test2":"Color.BLUE"}' | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-type: | ||
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8 | ||
date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
etag: | ||
- W/"datetime'2020-09-10T23%3A51%3A25.711904Z'" | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
transfer-encoding: | ||
- chunked | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-02-02' | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- application/json | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '0' | ||
Date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
User-Agent: | ||
- azsdk-python-data-tables/12.0.0b2 Python/2.7.18 (Windows-10-10.0.19041) | ||
x-ms-date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
x-ms-version: | ||
- '2019-02-02' | ||
method: DELETE | ||
uri: !!python/unicode https://storagename.table.core.windows.net/Tables('uttabled43513a4') | ||
response: | ||
body: | ||
string: !!python/unicode | ||
headers: | ||
cache-control: | ||
- no-cache | ||
content-length: | ||
- '0' | ||
date: | ||
- Thu, 10 Sep 2020 23:51:25 GMT | ||
server: | ||
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 | ||
x-content-type-options: | ||
- nosniff | ||
x-ms-version: | ||
- '2019-02-02' | ||
status: | ||
code: 204 | ||
message: No Content | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters