-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #4521 download journalist key via source interface #4523
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from . import source_navigation_steps | ||
from . import source_navigation_steps, journalist_navigation_steps | ||
from . import functional_test | ||
import six | ||
|
||
|
||
class TestSourceInterface( | ||
|
@@ -17,3 +18,16 @@ def test_lookup_codename_hint(self): | |
self._source_chooses_to_login() | ||
self._source_proceeds_to_login() | ||
self._source_sees_no_codename() | ||
|
||
|
||
class TestDownloadKey( | ||
functional_test.FunctionalTest, | ||
journalist_navigation_steps.JournalistNavigationStepsMixin): | ||
|
||
def test_journalist_key_from_source_interface(self): | ||
data = self.return_downloaded_content(self.source_location + | ||
"/journalist-key", None) | ||
|
||
if six.PY3: | ||
data = data.decode('utf-8') | ||
assert "BEGIN PGP PUBLIC KEY BLOCK" in data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the corresponding unit test in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 this should properly assess success/failure: journalist key served was an empty file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emkll - do you mean you got an empty file testing this PR, or 0.13.0 returns an empty file for you? I was seeing a 404 on 0.13.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion: