def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)
    def tearDownClass(cls):
        cls.email_server.stop()
        thumbnail_cache_path = os.path.join(CALIBRE_WEB_PATH, 'cps', 'cache', 'thumbnails')
        shutil.rmtree(thumbnail_cache_path, ignore_errors=True)
        try:
            cls.driver.get("http://127.0.0.1:8083")
            cls.stop_calibre_web()
            # close the browser window and stop calibre-web
            cls.driver.quit()
            cls.p.terminate()
        except Exception as e:
            print(e)
        time.sleep(2)

        remove_dependency(cls.dependency)

        src1 = os.path.join(CALIBRE_WEB_PATH, "client_secrets.json")
        src = os.path.join(CALIBRE_WEB_PATH, "gdrive_credentials")
        if os.path.exists(src):
            os.chmod(src, 0o764)
            try:
                os.unlink(src)
            except PermissionError:
                print('gdrive_credentials delete failed')
        if os.path.exists(src1):
            os.chmod(src1, 0o764)
            try:
                os.unlink(src1)
            except PermissionError:
                print('client_secrets.json delete failed')

        save_logfiles(cls, cls.__name__)
Beispiel #3
0
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     cls.driver.quit()
     cls.proxy.stop_proxy()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)
    def tearDownClass(cls):
        try:
            cls.driver.get("http://127.0.0.1:8083")
            cls.stop_calibre_web()
            # close the browser window and stop calibre-web
            cls.driver.quit()
            cls.p.terminate()
        except Exception as e:
            print(e)
        save_logfiles(cls, cls.__name__)

        remove_dependency(cls.dependency)

        src1 = os.path.join(CALIBRE_WEB_PATH, "client_secrets.json")
        src = os.path.join(CALIBRE_WEB_PATH, "gdrive_credentials")
        if os.path.exists(src):
            os.chmod(src, 0o764)
            try:
                os.unlink(src)
            except PermissionError:
                print('gdrive_credentials delete failed')
        if os.path.exists(src1):
            os.chmod(src1, 0o764)
            try:
                os.unlink(src1)
            except PermissionError:
                print('client_secrets.json delete failed')
Beispiel #5
0
 def tearDownClass(cls):
     cls.proxy.stop()
     cls.driver.get('http://' + get_Host_IP() + ':8083')
     cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     cls.driver.quit()
     cls.p.terminate()
     # close the browser window and stop calibre-web
     shutil.rmtree(TEST_DB + '_2', ignore_errors=True)
     save_logfiles(cls, cls.__name__)
Beispiel #7
0
 def tearDownClass(cls):
     cls.driver.switch_to.window(cls.current_handle)
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     cls.driver.quit()
     cls.p.terminate()
     # close the browser window and stop calibre-web
     # remove_dependency(cls.dependency)
     save_logfiles(cls, cls.__name__)
Beispiel #8
0
 def tearDownClass(cls):
     try:
         # close the browser window and stop calibre-web
         cls.driver.get("http://127.0.0.1:8083")
         cls.stop_calibre_web()
         cls.driver.quit()
         cls.p.terminate()
     except Exception as e:
         print(e)
     time.sleep(2)
     save_logfiles(cls, cls.__name__)
 def tearDownClass(cls):
     try:
         os.remove(os.path.join(base_path, 'files', 'book1.pdf'))
     except FileNotFoundError:
         pass
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)
Beispiel #10
0
 def tearDownClass(cls):
     shutil.rmtree(os.path.join(CALIBRE_WEB_PATH, "dist"), ignore_errors=True)
     shutil.rmtree(cls.package_path, ignore_errors=True)
     # close the browser window
     os.chdir(base_path)
     kill_dead_cps()
     cls.driver.quit()
     try:
         os.remove(os.path.join(CALIBRE_WEB_PATH, 'app.db'))
     except Exception:
         pass
     save_logfiles(cls, cls.__name__)
Beispiel #11
0
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.email_server.stop()
     try:
         cls.stop_calibre_web()
         # close the browser window and stop calibre-web
     except:
         pass
     cls.driver.quit()
     cls.p.terminate()
     time.sleep(2)
     save_logfiles(cls, cls.__name__)
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     cls.driver.quit()
     cls.p.terminate()
     # close the browser window and stop calibre-web
     shutil.rmtree(TEST_DB + '_2', ignore_errors=True)
     shutil.rmtree(TEST_DB + '_3', ignore_errors=True)
     save_logfiles(cls, cls.__name__)
     thumbnail_cache_path = os.path.join(CALIBRE_WEB_PATH, 'cps', 'cache',
                                         'thumbnails')
     shutil.rmtree(thumbnail_cache_path, ignore_errors=True)
Beispiel #13
0
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083/login")
     cls.login('admin', 'admin123')
     cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     try:
         os.unlink(
             os.path.join(CALIBRE_WEB_PATH, 'cps', 'static', 'robots.txt'))
     except:
         pass
     save_logfiles(cls, cls.__name__)
Beispiel #14
0
 def tearDownClass(cls):
     cls.driver.get("http://127.0.0.1:8083")
     cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)
     try:
         shutil.rmtree(os.path.join(CALIBRE_WEB_PATH, u'hü lo'),
                       ignore_errors=True)
         shutil.rmtree(os.path.join(CALIBRE_WEB_PATH, u'hö lo'),
                       ignore_errors=True)
     except:
         pass
 def tearDownClass(cls):
     # cls.stop_calibre_web()
     # close the browser window and stop calibre-web
     cls.driver.quit()
     cls.p.terminate()
     save_logfiles(cls, cls.__name__)