Skip to content

Commit

Permalink
Fix tests after some Pagure updates
Browse files Browse the repository at this point in the history
Signed-off-by: Akashdeep Dhar <[email protected]>
  • Loading branch information
gridhead committed Sep 2, 2024
1 parent 45dc48f commit 989aecc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,28 @@ def list_etoe_auth(list_etoe: list = standard_list.copy()) -> list: # noqa : B0
"[WARNING] [joystick.stg] The specified X.509 TLS certificate is about to expire in under", # noqa : E501
"[DEBUG] [joystick.stg] Notification request attempt count - 1 of 5",
"[DEBUG] Starting new HTTPS connection (1): pagure.io:443",
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/1.1\" 200", # noqa : E501
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/None\" 200", # noqa : E501
"[DEBUG] [joystick.stg] The notification request was met with response code 200",
"[DEBUG] [joystick.stg] The created notification ticket was created with ID",
"[INFO] [joystick.stg] The notification ticket for renewing the TLS certificate has now been created", # noqa : E501
"[WARNING] [nuancier.stg] The specified X.509 TLS certificate is about to expire in under", # noqa : E501
"[DEBUG] [nuancier.stg] Notification request attempt count - 1 of 5",
"[DEBUG] Starting new HTTPS connection (1): pagure.io:443",
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/1.1\" 200", # noqa : E501
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/None\" 200", # noqa : E501
"[DEBUG] [nuancier.stg] The notification request was met with response code 200",
"[DEBUG] [nuancier.stg] The created notification ticket was created with ID",
"[INFO] [nuancier.stg] The notification ticket for renewing the TLS certificate has now been created", # noqa : E501
"[WARNING] [robosign.stg] The specified X.509 TLS certificate is about to expire in under", # noqa : E501
"[DEBUG] [robosign.stg] Notification request attempt count - 1 of 5",
"[DEBUG] Starting new HTTPS connection (1): pagure.io:443",
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/1.1\" 200", # noqa : E501
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/None\" 200", # noqa : E501
"[DEBUG] [robosign.stg] The notification request was met with response code 200",
"[DEBUG] [robosign.stg] The created notification ticket was created with ID",
"[INFO] [robosign.stg] The notification ticket for renewing the TLS certificate has now been created", # noqa : E501
"[WARNING] [waiverdb.stg] The specified X.509 TLS certificate is about to expire in under", # noqa : E501
"[DEBUG] [waiverdb.stg] Notification request attempt count - 1 of 5",
"[DEBUG] Starting new HTTPS connection (1): pagure.io:443",
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/1.1\" 200", # noqa : E501
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/None\" 200", # noqa : E501
"[DEBUG] [waiverdb.stg] The notification request was met with response code 200",
"[DEBUG] [waiverdb.stg] The created notification ticket was created with ID",
"[INFO] [waiverdb.stg] The notification ticket for renewing the TLS certificate has now been created", # noqa : E501
Expand Down Expand Up @@ -132,7 +132,7 @@ def list_etoe_nope(list_etoe: list = standard_list.copy()) -> list: # noqa : B0
"[DEBUG] [waiverdb.stg] Notification request attempt count - 4 of 5",
"[DEBUG] [waiverdb.stg] Notification request attempt count - 5 of 5",
"[DEBUG] Starting new HTTPS connection (1): pagure.io:443",
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/1.1\" 401", # noqa : E501
f"[DEBUG] https://pagure.io:443 \"POST /api/0/{envr['FIRMITAS_TEST_REPONAME']}/new_issue HTTP/None\" 401", # noqa : E501
"[DEBUG] [joystick.stg] The notification request was met with response code 401",
"[DEBUG] [nuancier.stg] The notification request was met with response code 401",
"[DEBUG] [robosign.stg] The notification request was met with response code 401",
Expand Down
11 changes: 6 additions & 5 deletions test/test_etoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
from os import makedirs, path
from secrets import token_hex
from shutil import copyfile, rmtree

import pytest
from click.testing import CliRunner

from firmitas.main import main
from test import (
list_etoe_auth,
list_etoe_github,
Expand All @@ -33,11 +38,6 @@
list_etoe_pagure,
)

import pytest
from click.testing import CliRunner

from firmitas.main import main


def locate_config(gitforge: str = "pagure") -> str:
"""
Expand Down Expand Up @@ -159,6 +159,7 @@ def locate_config_with_simulate_coming_expiry(daysqant: int = 2000, password: st
def test_etoe(cmdl, code, text) -> None:
runner = CliRunner()
result = runner.invoke(main, cmdl)
print(result.output)
assert result.exit_code == code # noqa: S101
for indx in text:
assert indx in result.output # noqa: S101
Expand Down

0 comments on commit 989aecc

Please sign in to comment.