-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
153 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -808,9 +808,7 @@ def _start_irrds(self): | |
os.mkdir(self.piddir1) | ||
os.mkdir(self.piddir2) | ||
|
||
print( | ||
textwrap.dedent( | ||
f""" | ||
print(textwrap.dedent(f""" | ||
Preparing to start IRRd for integration test. | ||
IRRd #1 running on HTTP port {self.port_http1}, whois port {self.port_whois1} | ||
|
@@ -824,9 +822,7 @@ def _start_irrds(self): | |
Database URL: {self.database_url2} | ||
PID file: {self.pidfile2} | ||
Logfile: {self.logfile2} | ||
""" | ||
) | ||
) | ||
""")) | ||
|
||
with open(self.roa_source1, "w") as roa_file: | ||
ujson.dump( | ||
|
@@ -969,9 +965,7 @@ def _submit_update(self, config_path, request): | |
with a specific config path. Request is the raw RPSL update, possibly | ||
signed with inline PGP. | ||
""" | ||
email = ( | ||
textwrap.dedent( | ||
""" | ||
email = textwrap.dedent(""" | ||
From [email protected]@localhost Thu Jan 5 10:04:48 2018 | ||
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) | ||
by hostname (Postfix) with ESMTPS id 740AD310597 | ||
|
@@ -987,11 +981,7 @@ def _submit_update(self, config_path, request): | |
Content-Type: text/plain; charset=utf-8 | ||
Mime-Version: 1.0 | ||
""" | ||
) | ||
.lstrip() | ||
.encode("utf-8") | ||
) | ||
""").lstrip().encode("utf-8") | ||
email += base64.b64encode(request.encode("utf-8")) | ||
|
||
script = IRRD_ROOT_PATH + "/irrd/scripts/submit_email.py" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,10 +82,7 @@ def test_notify_regular(self, monkeypatch, config_override): | |
expected_recipients = {"[email protected]", "[email protected]", "[email protected]"} | ||
assert actual_recipients == expected_recipients | ||
assert mock_email.mock_calls[0][1][1] == "route(6) objects in TEST marked RPKI invalid" | ||
assert ( | ||
mock_email.mock_calls[0][1][2] | ||
== textwrap.dedent( | ||
""" | ||
assert mock_email.mock_calls[0][1][2] == textwrap.dedent(""" | ||
This is to notify that 1 route(6) objects for which you are a | ||
contact have been marked as RPKI invalid. This concerns | ||
objects in the TEST database. | ||
|
@@ -124,9 +121,7 @@ def test_notify_regular(self, monkeypatch, config_override): | |
mnt-by: DOESNOTEXIST-MNT | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
""" | ||
).strip() | ||
) | ||
""").strip() | ||
|
||
def test_notify_disabled(self, monkeypatch, config_override): | ||
config_override( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.