예제 #1
0
 def test_shard_params(self):
     payload = {
         'cursor': None,
         'task_start': '2016-04-07 12:13:14',
         'task_count': 2,
         'count': 42,
     }
     params = ts_mon_metrics._ShardParams(json.dumps(payload))
     self.assertEqual(json.loads(params.json()), payload)
예제 #2
0
 def test_shard_params_fail(self):
     with self.assertRaises(ValueError):
         ts_mon_metrics._ShardParams('invalid}')