From 7d2e895d26881cd7f8a35c3751891879db0509c7 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Mon, 20 Apr 2020 07:52:44 +0200 Subject: [PATCH] test: avoid import-aliasing for trivial case This drops the `server` alias for `http.server`. There is only a single caller, so lets just be explicit so the callsite is easier to understand. As a side effect, this unifies all the imports, no cherrypicking anymore. --- test/test_sources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_sources.py b/test/test_sources.py index b5aa4da3..7b5692b7 100644 --- a/test/test_sources.py +++ b/test/test_sources.py @@ -1,5 +1,6 @@ import contextlib import ctypes +import http.server import json import os import osbuild.sources @@ -9,7 +10,6 @@ import tempfile import threading import unittest -from http import server def errcheck(ret, func, args): if ret == -1: @@ -52,7 +52,7 @@ def fileServer(path): def runFileServer(path, barrier): - httpd = socketserver.TCPServer(('', 80), server.SimpleHTTPRequestHandler) + httpd = socketserver.TCPServer(('', 80), http.server.SimpleHTTPRequestHandler) barrier.wait() httpd.serve_forever()