Esempio n. 1
0
    def wrapper(*args, **kwargs):
        @h_client_routine(clear_folders=True)
        def exe():
            return func(*args, **kwargs)

        server_process = h_start_server_process()
        ret = exe()
        h_stop_server_process(server_process)
        return ret
Esempio n. 2
0
 def tearDown(self) -> None:
     h_stop_server_process(self._server_process)
Esempio n. 3
0
    gui.main.main()


def simulate_explorer2():
    file_changes_json.init_file()
    h_watch_dummy_folder("folder1")
    h_watch_dummy_folder("r2folsdfsf")

    gui.main.main()


@h_client_routine(clear_folders=True)
def simulate_main():
    h_register_dummy_user_device_client()
    main_thread = threading.Thread(target=main.start, daemon=True)
    main_thread.start()
    gui.main.main()
    main.shutdown()


@h_client_routine(clear_server_db=True, clear_folders=True)
def simulate_register():
    file_changes_json.init_file()
    gui.main.main()


if __name__ == '__main__':
    server_process = h_start_server_process()
    simulate_explorer()
    h_stop_server_process(server_process)
Esempio n. 4
0
 def tearDown(self) -> None:
     main.shutdown()
     h_stop_server_process(self._server_process)
Esempio n. 5
0
 def tearDown(self) -> None:
     file_changes.stop_observing()
     h_stop_server_process(self._server_process)
 def tearDown(self) -> None:
     h_stop_server_process(self._server_process)
     try:
         shutil.rmtree(self.server_folder)
     except:
         pass