diff --git a/test/new_tests/test_get_put_keyordereddict.py b/test/new_tests/test_get_put_keyordereddict.py new file mode 100644 index 0000000000..a7a5ef1188 --- /dev/null +++ b/test/new_tests/test_get_put_keyordereddict.py @@ -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