Exemplo n.º 1
0
 def test_get_histogram(self):
     acc1 = Accumulator.get_or_insert('test:7')
     acc2 = Accumulator.get_or_insert('test:8')
     acc1.count = 4
     acc2.count = 6
     ndb.put_multi([acc1, acc2])
     counts = Accumulator.get_histogram('test')
     self.assertListEqual(counts, 
         [0,0,0,0,0,0,4,6,0,0,
          0,0,0,0,0,0,0,0,0,0,
          0,0,0,0,0,0,0,0,0,0,0])