testutils: improve get_stats OF 1.3 support
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index ccd8be7..8a5a563 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -1314,15 +1314,18 @@
     Retrieve a list of stats entries. Handles OFPSF_REPLY_MORE.
     """
     if ofp.OFP_VERSION <= 3:
+        msgtype = ofp.OFPT_STATS_REPLY
         more_flag = ofp.OFPSF_REPLY_MORE
     else:
+        msgtype = ofp.OFPT_MULTIPART_REPLY
         more_flag = ofp.OFPMPF_REPLY_MORE
     stats = []
     reply, _ = test.controller.transact(req)
     test.assertTrue(reply is not None, "No response to stats request")
+    test.assertEquals(reply.type, msgtype, "Response had unexpected message type")
     stats.extend(reply.entries)
     while reply.flags & more_flag != 0:
-        reply, pkt = test.controller.poll(exp_msg=ofp.OFPT_STATS_REPLY)
+        reply, pkt = test.controller.poll(exp_msg=msgtype)
         test.assertTrue(reply is not None, "No response to stats request")
         stats.extend(reply.entries)
     return stats