Skip to content

Add port option for ChannelsLiveServerTestCase - #2136

Closed
MohammedSaleh2001 wants to merge 0 commit into
django:mainfrom
MohammedSaleh2001:main
Closed

Add port option for ChannelsLiveServerTestCase#2136
MohammedSaleh2001 wants to merge 0 commit into
django:mainfrom
MohammedSaleh2001:main

Conversation

@MohammedSaleh2001

@MohammedSaleh2001 MohammedSaleh2001 commented Feb 20, 2025

Copy link
Copy Markdown

Changes based on https://github.com/django/channels/discussions/2135

Add an accessible port attribute for the ChannelsLiveServerTestCase class. Since it is supposed to be externally accessible now, I removed the internal indicator.

This depends on changes to DaphneProcess in another pull request I've made to that repository: https://github.com/django/daphne/pull/550

@carltongibson carltongibson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MohammedSaleh2001 — thanks for this.

I think at the least, we should document the new feature in the testing docs...

https://channels.readthedocs.io/en/latest/topics/testing.html#serve-static

Otherwise no-one will ever know about it.

@MohammedSaleh2001

Copy link
Copy Markdown
Author

Hi, I've updated the documentation. If it needs more detail let me know, thanks.

Also, is the Daphne PR okay? I didn't see any documentation to update there.

@carltongibson

Copy link
Copy Markdown
Member

@MohammedSaleh2001 The DaphneProcess is internal. (No need for docs there)

@MohammedSaleh2001

Copy link
Copy Markdown
Author

Thanks for letting me know. I also fixed the line length, hopefully that will suffice.

@carltongibson

Copy link
Copy Markdown
Member

@MohammedSaleh2001 Sorry I broke this PR rebasing. Carried on in #2173.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants