@@ -49,7 +49,7 @@ async def test_session_token_compatibility_async(self):
49
49
database_list = [db async for db in self .client .list_databases (session_token = str (uuid .uuid4 ()))]
50
50
database_list2 = [db async for db in self .client .query_databases (query = "select * from c" , session_token = str (uuid .uuid4 ()))]
51
51
assert len (database_list ) > 0
52
- # assert database_list == database_list2
52
+ assert len ( database_list2 ) > 0
53
53
database_read = await database .read (session_token = str (uuid .uuid4 ()))
54
54
assert database_read is not None
55
55
await self .client .delete_database (database2 .id , session_token = str (uuid .uuid4 ()))
@@ -60,23 +60,23 @@ async def test_session_token_compatibility_async(self):
60
60
assert e .status_code == 404
61
61
62
62
# Container
63
- container = await database .create_container (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ), session_token = str (uuid .uuid4 ()))
63
+ container = await self . created_database .create_container (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ), session_token = str (uuid .uuid4 ()))
64
64
assert container is not None
65
- container2 = await database .create_container_if_not_exists (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ), session_token = str (uuid .uuid4 ()))
65
+ container2 = await self . created_database .create_container_if_not_exists (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ), session_token = str (uuid .uuid4 ()))
66
66
assert container2 is not None
67
- container_list = [cont async for cont in database .list_containers (session_token = str (uuid .uuid4 ()))]
68
- container_list2 = [cont async for cont in database .query_containers (query = "select * from c" , session_token = str (uuid .uuid4 ()))]
67
+ container_list = [cont async for cont in self . created_database .list_containers (session_token = str (uuid .uuid4 ()))]
68
+ container_list2 = [cont async for cont in self . created_database .query_containers (query = "select * from c" , session_token = str (uuid .uuid4 ()))]
69
69
assert len (container_list ) > 0
70
- assert container_list == container_list2
70
+ assert len ( container_list2 ) > 0
71
71
container2_read = await container2 .read (session_token = str (uuid .uuid4 ()))
72
72
assert container2_read is not None
73
- replace_container = await database .replace_container (container2 , PartitionKey (path = "/pk" ), default_ttl = 30 , session_token = str (uuid .uuid4 ()))
73
+ replace_container = await self . created_database .replace_container (container2 , PartitionKey (path = "/pk" ), default_ttl = 30 , session_token = str (uuid .uuid4 ()))
74
74
replace_container_read = await replace_container .read ()
75
75
assert replace_container is not None
76
76
assert replace_container_read != container2_read
77
77
assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property
78
78
assert replace_container_read ['defaultTtl' ] == 30
79
- await database .delete_container (replace_container .id , session_token = str (uuid .uuid4 ()))
79
+ await self . created_database .delete_container (replace_container .id , session_token = str (uuid .uuid4 ()))
80
80
try :
81
81
await container2 .read ()
82
82
pytest .fail ("Container read should have failed" )
@@ -100,21 +100,21 @@ async def test_etag_match_condition_compatibility_async(self):
100
100
assert e .status_code == 404
101
101
102
102
# Container
103
- container = await database .create_container (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ),
103
+ container = await self . created_database .create_container (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ),
104
104
etag = str (uuid .uuid4 ()), match_condition = MatchConditions .IfModified )
105
105
assert container is not None
106
- container2 = await database .create_container_if_not_exists (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ),
106
+ container2 = await self . created_database .create_container_if_not_exists (str (uuid .uuid4 ()), PartitionKey (path = "/pk" ),
107
107
etag = str (uuid .uuid4 ()), match_condition = MatchConditions .IfNotModified )
108
108
assert container2 is not None
109
109
container2_read = await container2 .read ()
110
110
assert container2_read is not None
111
- replace_container = await database .replace_container (container2 , PartitionKey (path = "/pk" ), default_ttl = 30 ,
111
+ replace_container = await self . created_database .replace_container (container2 , PartitionKey (path = "/pk" ), default_ttl = 30 ,
112
112
etag = str (uuid .uuid4 ()), match_condition = MatchConditions .IfModified )
113
113
replace_container_read = await replace_container .read ()
114
114
assert replace_container is not None
115
115
assert replace_container_read != container2_read
116
116
assert 'defaultTtl' in replace_container_read # Check for default_ttl as a new additional property
117
- await database .delete_container (replace_container .id , etag = str (uuid .uuid4 ()), match_condition = MatchConditions .IfModified )
117
+ await self . created_database .delete_container (replace_container .id , etag = str (uuid .uuid4 ()), match_condition = MatchConditions .IfModified )
118
118
try :
119
119
await container2 .read ()
120
120
pytest .fail ("Container read should have failed" )
0 commit comments