Skip to content

Commit

Permalink
Add test for getting and putting key ordered map
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Feb 8, 2024
1 parent 8aa7e68 commit 17dec76
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/new_tests/test_get_put_keyordereddict.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from aerospike import KeyOrderedDict
import pytest


class TestGetPutOrderedDict:
@pytest.fixture(autouse=True)
def setup(self, request, as_connection):
pass

def test_get_put_keyordereddict(self):
bins = {
"dict": KeyOrderedDict({"f": 6, "e": 5, "d": 4})
}
key = ("test", "demo", 1)
self.as_connection.put(key, bins)

_, _, res = self.as_connection.get(key)
assert res["dict"] == KeyOrderedDict({"f": 6, "e": 5, "d": 4})
assert type(res["dict"]) == KeyOrderedDict

0 comments on commit 17dec76

Please sign in to comment.