From 17dec768f2f56020cf0006afd9324fbb1a1e37b8 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 14 Sep 2023 14:33:41 -0700 Subject: [PATCH] Add test for getting and putting key ordered map --- test/new_tests/test_get_put_keyordereddict.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/new_tests/test_get_put_keyordereddict.py 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