def tearDown(self):
        # restore the trusted CA dir
        from django.conf import settings as djangosettings
        import os
        after = os.listdir(djangosettings.XMLRPC_TRUSTED_CA_PATH)
        for path in after:
            if path not in self.before:
                os.unlink(os.path.join(djangosettings.XMLRPC_TRUSTED_CA_PATH, path))

        if settings.PAUSE_AFTER_TESTS:
            raw_input("Press ENTER to continue:")
        
        try:
            del self.switches
        except:
            pass
        try:
            del self.links
        except:
            pass
        
        try:
            self.am_proc.terminate()
        except:
            pass
        
        try:
            self.ch_proc.terminate()
        except:
            pass

        import time
        time.sleep(4)
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/plugins/openflow/tests/gapi/gapi.py/GAPITests.tearDown/original