diff options
| author | adamjanovsky | 2021-12-19 12:20:06 +0100 |
|---|---|---|
| committer | GitHub | 2021-12-19 12:20:06 +0100 |
| commit | a82f85fbfdee4cd995cc1ccd891e3eec2d032e79 (patch) | |
| tree | 238321a3f2337981a9a991dd8eb1edc8dde8b9f2 /tests/fips_test_utils.py | |
| parent | a8543e1364d377878b901283eb012da3ceb0d088 (diff) | |
| parent | eedf0d439c71e0e1a76350ff1e5ee6efd8ef80d6 (diff) | |
| download | sec-certs-a82f85fbfdee4cd995cc1ccd891e3eec2d032e79.tar.gz sec-certs-a82f85fbfdee4cd995cc1ccd891e3eec2d032e79.tar.zst sec-certs-a82f85fbfdee4cd995cc1ccd891e3eec2d032e79.zip | |
Merge pull request #144 from crocs-muni/closes-#106
Black, Flake8, isort linters: Closes-#106
Diffstat (limited to 'tests/fips_test_utils.py')
| -rw-r--r-- | tests/fips_test_utils.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/fips_test_utils.py b/tests/fips_test_utils.py index 94fb406a..2fce325b 100644 --- a/tests/fips_test_utils.py +++ b/tests/fips_test_utils.py @@ -1,17 +1,18 @@ -from typing import List from pathlib import Path +from typing import List + def generate_html(ids: List[str], path: Path): def generate_entry(certificate_id: str) -> str: - return f''' + return f""" <tr id="cert-row-0"> <td class="text-center"> <a href="/projects/cryptographic-module-validation-program/certificate/3898" id="cert-number-link-0">{certificate_id}</a> </td> </tr> - ''' + """ - html_head = ''' + html_head = """ <!DOCTYPE html> <html lang="en-us" xml:lang="en-us"> <head> @@ -25,11 +26,11 @@ def generate_html(ids: List[str], path: Path): <meta name="theme-color" content="#000000" /> <meta name="google-site-verification" content="xbrnrVYDgLD-Bd64xHLCt4XsPXzUhQ-4lGMj4TdUUTA" /> </head> - ''' + """ rows = "" for cert_id in ids: rows += f"\n{generate_entry(cert_id)}\n" - html_body = f''' + html_body = f""" <body> <table class="table table-striped table-condensed publications-table table-bordered" id="searchResultsTable"> <thead> @@ -46,6 +47,6 @@ def generate_html(ids: List[str], path: Path): </tbody> </table> </body> - ''' - with open(path, 'w') as f: + """ + with open(path, "w") as f: f.write(f"{html_head}\n{html_body}\n") |
