msgpack for queue

This commit is contained in:
2021-01-20 20:30:57 -05:00
parent c4fca1b754
commit a2cfab55bc
3 changed files with 22 additions and 4 deletions

View File

@@ -78,4 +78,20 @@ class TestVolatileQueue(TestCase):
s.put("test")
item = s.get()
self.assertTrue(item == b"test")
self.assertTrue(item == "test")
def test_dict(self):
s = VolatileQueue(key="test5")
s.put({"a": 1})
item = s.get()
self.assertTrue(item["a"] == 1)
def test_int(self):
s = VolatileQueue(key="test5")
s.put(123)
item = s.get()
self.assertTrue(item == 123)