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.
This commit is contained in:
David Rheinsberg 2020-04-20 07:52:44 +02:00 committed by Tom Gundersen
parent 8464e8d1dc
commit 7d2e895d26

View file

@ -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()