Example #1
0
 def test_parse_snap_bad_data(self):
     parser = ijson.parse(StringIO(json.dumps({
         "nodes": [
             "foo"
         ]
     })))
     next(parser)
     self.assertRaises(ValueError, driver._parse_map, parser, None)
Example #2
0
 def test_parse_snap_error_from_etcd(self):
     parser = ijson.parse(StringIO(json.dumps({"errorCode": 100})))
     next(parser)
     self.assertRaises(ResyncRequired, driver._parse_map, parser, None)
Example #3
0
 def test_parse_snap_error_from_etcd(self):
     parser = ijson.parse(StringIO(json.dumps({
         "errorCode": 100
     })))
     next(parser)
     self.assertRaises(ResyncRequired, driver._parse_map, parser, None)