def test_cleanup(self):
        """Test _cleanup kills all instance kinds"""
        redis = RedisInstance(10101)
        mongo = MongoInstance(10102)
        self.assertEqual(len(managed_instance.running_instances), 2)

        managed_instance._cleanup(exiting=True)
        self.assertEqual(len(managed_instance.running_instances), 0)
        self.assertFalse(os.path.exists(managed_instance.instance_tmpdir))

        # It's module-wide so reset this for future tests
        managed_instance.instance_tmpdir = tempfile.mkdtemp()
    def test_cleanup(self):
        """Test _cleanup kills all instance kinds"""
        redis = RedisInstance(10101)
        mongo = MongoInstance(10102)
        self.assertEqual(len(managed_instance.running_instances), 2)

        managed_instance._cleanup(exiting=True)
        self.assertEqual(len(managed_instance.running_instances), 0)
        self.assertFalse(os.path.exists(managed_instance.instance_tmpdir))

        # It's module-wide so reset this for future tests
        managed_instance.instance_tmpdir = tempfile.mkdtemp()
 def tearDown(self):
     managed_instance._cleanup()
 def tearDown(self):
     managed_instance._cleanup()