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)
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)
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)