Ridiculous code in ssl endpoint unit tests for ca certs dir
Open
Nobody has claimed this yet.
core
enhancement
new
priority-normal
tests
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @exarkun reported | |
|---|---|
| Trac ID | trac#5754 |
| Type | enhancement |
| Created | 2012-07-09 00:35:40Z |
twisted/internet/test/test_endpoints.py, SSLClientStringTests, contains this awesome stanza:
expectedCerts = [
Certificate.loadPEM(x.getContent()) for x in
[casPath.child("thing1.pem"), casPath.child("thing2.pem")]
if x.basename().lower().endswith('.pem')
]
Determining the circumstances under which that code produces different results than:
expectedCerts = [
Certificate.loadPEM(casPath.child(x).getContent())
for x in ["thing1.pem", "thing2.pem"]]
is left as an exercise for the reader.
Searchable metadata
trac-id__5754 5754
type__enhancement enhancement
reporter__exarkun exarkun
priority__normal normal
milestone__
branch__
branch_author__
status__new new
resolution__None None
component__core core
keywords__endpoints_tests endpoints tests
time__1341794140000000 1341794140000000
changetime__1365608783000000 1365608783000000
version__None None
owner__
cc__thijs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in twisted/internet/test/test_endpoints.py, in SSLClientStringTests, and compare the expectedCerts setup with the simpler form shown in the issue. Run the endpoint tests and confirm they still validate the same CA certificates without the unnecessary path filtering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100