Skip to content

Commit

Permalink
support python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Oct 15, 2024
1 parent 5c721fa commit da295ab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.10']
python-version: ['3.8', '3.10', '3.12']

services:
elastic:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@
"Programming Language :: Python :: 3",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
],
python_requires=">=3.8",
)
14 changes: 7 additions & 7 deletions test/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def test_bulk_insert(self):
},
],
)
self.assertEquals(3, count)
self.assertEquals(0, len(_errors))
self.assertEqual(3, count)
self.assertEqual(0, len(_errors))

def test_query_filter_with_filter_dsl_and_schema_filter(self):
with self.app.app_context():
Expand Down Expand Up @@ -710,7 +710,7 @@ def test_basic_search_query(self):
with self.app.test_request_context("/items/?q=foo"):
req = parse_request("items")
cursor, count = self.app.data.find("items", req, None)
self.assertEquals(1, cursor.count())
self.assertEqual(1, cursor.count())

def test_phrase_search_query(self):
with self.app.app_context():
Expand All @@ -719,12 +719,12 @@ def test_phrase_search_query(self):
with self.app.test_request_context('/items/?q="foo bar"'):
req = parse_request("items")
cursor, count = self.app.data.find("items", req, None)
self.assertEquals(1, cursor.count())
self.assertEqual(1, cursor.count())

with self.app.test_request_context('/items/?q="bar foo"'):
req = parse_request("items")
cursor, count = self.app.data.find("items", req, None)
self.assertEquals(0, cursor.count())
self.assertEqual(0, cursor.count())

def test_elastic_filter_callback(self):
with self.app.app_context():
Expand Down Expand Up @@ -1280,8 +1280,8 @@ def test_bulk_insert_child_items(self):
{"_id": "u3", "name": "foo", "item_id": "item3"},
],
)
self.assertEquals(3, count)
self.assertEquals(0, len(_errors))
self.assertEqual(3, count)
self.assertEqual(0, len(_errors))

def test_replace_child_item(self):
with self.app.app_context():
Expand Down

0 comments on commit da295ab

Please sign in to comment.