I am currently testing my website on a local webserver.
The localhost port localhost:[port] keeps changing everytime I run the python3 manage.py unittest.
As a result of the localhost:port changing on every test, it cannot match the url [localhost:'port'] with the redirect url that I have entered in the Oauth credentials.
How am I able to run my unittests and have the browser use a certain port every time?
I'm currently following the taskbuster django tutorial http://www.marinamele.com/user-authentication-with-google-using-django-allauth taskbuster
If you scroll down on that page to the following section "indicating that the redirect URI at http://localhost:8081 is not valid. This is because we registered a different url, http://127.0.0.1:8000, and not the one that is used by tests." Then my problem will become apparent.
To summarise
1.I've registed the callback url to be http:127.0.0.1:8081
Everytime I run the unit test, the web server runs on the follwoing 'http:127.0.0.1:53000' or a variant of that number.
- How do I get the test to run on a designated port.