tests: Add script test

This commit is contained in:
tecnovert
2023-02-14 23:34:01 +02:00
parent 9117e2b723
commit dc0bd147b8
11 changed files with 1379 additions and 106 deletions

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2019-2022 tecnovert
# Copyright (c) 2019-2023 tecnovert
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
@@ -697,11 +697,8 @@ class HttpThread(threading.Thread, HTTPServer):
data = response.read()
conn.close()
def stopped(self):
return self.stop_event.is_set()
def serve_forever(self):
while not self.stopped():
while not self.stop_event.is_set():
self.handle_request()
self.socket.close()