def test_last(self): create(self.SIMPLE_CREATE_ARGS) self.assertEqual(time_ref, last('/tmp/foo')) update_start = time_ref + 1 for ts in range(update_start, update_start + 300, 10): update('/tmp/foo', '%i:100:200' % ts) self.assertEqual(ts, last('/tmp/foo'))
def test_update_r(self): create(*self.SIMPLE_CREATE_ARGS) for i in range(1, 100): update_r('/tmp/foo', ['%i:%i:%i' % (time_ref + i, i, i)]) self.assertEqual(time_ref + 99, last('/tmp/foo'))