def test_append(self):
     asm = AerospikeClientMock()
     key = ("a", "b", "c")
     asm.put(key, {"word": "ello"})
     asm.prepend(key, "word", "h")
     self.assertEqual({('a', 'b', 'c'): {'word': 'hello'}}, asm.dump())
     self.assertEqual(
         (('a', 'b', 'c'), {'gen': 2, 'ttl': 0}, {'word': 'hello'}),
         asm.get(key))
示例#2
0
 def test_append(self):
     asm = AerospikeClientMock()
     key = ("a", "b", "c")
     asm.put(key, {"word": "ello"})
     asm.prepend(key, "word", "h")
     self.assertEqual({('a', 'b', 'c'): {'word': 'hello'}}, asm.dump())
     self.assertEqual((('a', 'b', 'c'), {
         'gen': 2,
         'ttl': 0
     }, {
         'word': 'hello'
     }), asm.get(key))