pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

live_server fixture doesn't connect but throws ERR_CONNECTION_REFUSED

Open Micromegass opened this issue 5 years ago • 0 comments
trafficstars

I am trying to run selenium tests with pytest-django on a docker environment but the live_server fixture seems to not work. Simple test don't work like:

It refuses the connection with ERR_CONNECTION_REFUSED

    def test_demo(self,live_server,setup):
        print(live_server.url)
        browser.get(live_server.url)
        assert 'MyTitle' in browser.title

Writing the same with django's inbuilt LiveServerTestCase works.

Micromegass avatar Feb 24 '20 12:02 Micromegass