diff --git a/tests/basic.py b/tests/basic.py
index 16f3b31..d1bde14 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -117,40 +117,6 @@
                                    'Response packet does not match send packet' +
                                    ' for port ' + str(of_port))
 
-@nonstandard
-class PacketInDefaultDrop(base_tests.SimpleDataPlane):
-    """
-    Test packet in function
-
-    Send a packet to each dataplane port and verify that a packet
-    in message is received from the controller for each
-    """
-
-    def runTest(self):
-        delete_all_flows(self.controller)
-        do_barrier(self.controller)
-
-        for of_port in config["port_map"].keys():
-            pkt = simple_tcp_packet()
-            self.dataplane.send(of_port, str(pkt))
-            count = 0
-            while True:
-                (response, raw) = self.controller.poll(ofp.OFPT_PACKET_IN)
-                if not response:  # Timeout
-                    break
-                if dataplane.match_exp_pkt(pkt, response.data): # Got match
-                    break
-                if not config["relax"]:  # Only one attempt to match
-                    break
-                count += 1
-                if count > 10:   # Too many tries
-                    break
-
-            self.assertTrue(response is None, 
-                            'Packet in message received on port ' + 
-                            str(of_port))
-
-@nonstandard
 class PacketInBroadcastCheck(base_tests.SimpleDataPlane):
     """
     Check if bcast pkts leak when no flows are present
@@ -267,7 +233,6 @@
                                  set(of_ports).difference(dp_ports),
                                  self)
 
-@disabled
 class FlowStatsGet(base_tests.SimpleProtocol):
     """
     Get stats 
diff --git a/tests/default_drop.py b/tests/default_drop.py
new file mode 100644
index 0000000..7103f2a
--- /dev/null
+++ b/tests/default_drop.py
@@ -0,0 +1,45 @@
+"""
+These tests require a switch that drops packet-ins.
+"""
+
+import logging
+
+from oftest import config
+import oftest.controller as controller
+import oftest.cstruct as ofp
+import oftest.message as message
+import oftest.dataplane as dataplane
+import oftest.action as action
+import oftest.base_tests as base_tests
+
+from oftest.testutils import *
+
+@nonstandard
+class PacketInDefaultDrop(base_tests.SimpleDataPlane):
+    """
+    Verify that packet-ins are not received.
+    """
+
+    def runTest(self):
+        delete_all_flows(self.controller)
+        do_barrier(self.controller)
+
+        for of_port in config["port_map"].keys():
+            pkt = simple_tcp_packet()
+            self.dataplane.send(of_port, str(pkt))
+            count = 0
+            while True:
+                (response, raw) = self.controller.poll(ofp.OFPT_PACKET_IN)
+                if not response:  # Timeout
+                    break
+                if dataplane.match_exp_pkt(pkt, response.data): # Got match
+                    break
+                if not config["relax"]:  # Only one attempt to match
+                    break
+                count += 1
+                if count > 10:   # Too many tries
+                    break
+
+            self.assertTrue(response is None, 
+                            'Packet in message received on port ' + 
+                            str(of_port))
