-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for getting and putting key ordered map
- Loading branch information
1 parent
8aa7e68
commit 17dec76
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |