global: fix PEP-8 formatting
This patch was generated by running `autopep8 --diff` on the source tree and then applying the diff.
This commit is contained in:
parent
bb644cdd07
commit
f05078f66e
20 changed files with 36 additions and 28 deletions
|
|
@ -13,6 +13,7 @@ from osbuild.util import jsoncomm
|
|||
|
||||
class APITester(osbuild.api.BaseAPI):
|
||||
"""Records the number of messages and if it got cleaned up"""
|
||||
|
||||
def __init__(self, sockaddr):
|
||||
super().__init__(sockaddr)
|
||||
self.clean = False
|
||||
|
|
@ -33,6 +34,7 @@ class APITester(osbuild.api.BaseAPI):
|
|||
|
||||
class TestAPI(unittest.TestCase):
|
||||
"""Check API infrastructure"""
|
||||
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ class TestFormatV1(unittest.TestCase):
|
|||
self.assertEqual(pl.runner, runner)
|
||||
check_stage(have, want)
|
||||
|
||||
|
||||
def test_describe(self):
|
||||
index = osbuild.meta.Index(os.curdir)
|
||||
|
||||
|
|
@ -412,9 +411,9 @@ class TestFormatV1(unittest.TestCase):
|
|||
self.assertEqual(res.valid, False)
|
||||
self.assertEqual(len(res), 2)
|
||||
lst = res[".pipeline.stages[0].options"]
|
||||
self.assertEqual(len(lst), 1) # missing rootfs
|
||||
self.assertEqual(len(lst), 1) # missing rootfs
|
||||
lst = res[".pipeline.stages[0].options.uefi"]
|
||||
self.assertEqual(len(lst), 1) # missing "osname"
|
||||
self.assertEqual(len(lst), 1) # missing "osname"
|
||||
|
||||
assembler_check = {
|
||||
"pipeline": {
|
||||
|
|
@ -431,6 +430,6 @@ class TestFormatV1(unittest.TestCase):
|
|||
self.assertEqual(res.valid, False)
|
||||
self.assertEqual(len(res), 2)
|
||||
lst = res[".pipeline.assembler.options"]
|
||||
self.assertEqual(len(lst), 1) # missing "filename"
|
||||
self.assertEqual(len(lst), 1) # missing "filename"
|
||||
lst = res[".pipeline.assembler.options.compression"]
|
||||
self.assertEqual(len(lst), 1) # wrong compression method
|
||||
self.assertEqual(len(lst), 1) # wrong compression method
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class TestObjectStore(unittest.TestCase):
|
|||
with object_store.new() as tree:
|
||||
path = tree.write()
|
||||
with tree.write() as path, \
|
||||
open(os.path.join(path, "data"), "w") as f:
|
||||
open(os.path.join(path, "data"), "w") as f:
|
||||
f.write(data)
|
||||
st = os.fstat(f.fileno())
|
||||
data_inode = st.st_ino
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class TestUtilLorax(test.TestBase):
|
|||
if not os.path.exists(target):
|
||||
self.fail(f"Path {target} does not exists")
|
||||
|
||||
|
||||
def test_script(self):
|
||||
with tempfile.TemporaryDirectory(dir="/var/tmp") as tmp:
|
||||
root = os.path.join(tmp, "root")
|
||||
|
|
@ -81,7 +80,6 @@ class TestUtilLorax(test.TestBase):
|
|||
data = f.read().strip()
|
||||
self.assertEqual(data, "osbuild-42")
|
||||
|
||||
|
||||
def test_script_errors(self):
|
||||
with tempfile.TemporaryDirectory(dir="/var/tmp") as tmp:
|
||||
root = os.path.join(tmp, "root")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import os
|
|||
|
||||
from osbuild.util import path
|
||||
|
||||
|
||||
def test_in_tree():
|
||||
cases = {
|
||||
("/tmp/file", "/tmp", False): True, # Simple, non-existent
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from io import StringIO
|
|||
|
||||
from osbuild.util.rhsm import Subscriptions
|
||||
|
||||
REPO_FILE="""[jpp]
|
||||
REPO_FILE = """[jpp]
|
||||
name = Red Hat JBoss Portal
|
||||
baseurl = https://cdn.redhat.com/1.0/$basearch/os
|
||||
enabled = 0
|
||||
|
|
@ -66,7 +66,7 @@ def test_from_host_system():
|
|||
|
||||
raise e
|
||||
|
||||
assert test_case["success"] # Verify this test case should pass
|
||||
assert test_case["success"] # Verify this test case should pass
|
||||
assert secrets["ssl_ca_cert"] == "/etc/rhsm/ca/redhat-uep.pem"
|
||||
assert secrets["ssl_client_key"] == f'/etc/pki/entitlement/{test_case["key"]}-key.pem'
|
||||
assert secrets["ssl_client_cert"] == f'/etc/pki/entitlement/{test_case["key"]}.pem'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue