Skip to content

Commit 031ea2b

Browse files
author
Masoud
committed
fix
1 parent 8b009cf commit 031ea2b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/document/test_timeseries_collection.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ class SensorDataWithIndex(Document):
133133

134134
collection = SensorDataWithIndex._get_collection()
135135

136-
# Create another index
137-
collection.create_index([("timestamp", 1)])
138-
collection.create_index([("temperature", 1)])
139-
140136
indexes = collection.index_information()
137+
138+
assert (
139+
"timestamp_index" in indexes
140+
), "Index on 'timestamp' field was not created"
141141
assert (
142-
"temperature_location_index" in indexes
143-
), "Index on 'location' field was not created"
142+
"temperature_index" in indexes
143+
), "Index on 'temperature' field was not created"
144144

145145
@requires_mongodb_gte_50
146146
def test_timeseries_data_insertion_order(self):

0 commit comments

Comments
 (0)