Your Django container isn’t accessible via localhost from Selenium.
Inside Docker, use the service name (django:8006) instead of localhost, and point your WebDriver to http://selenium-hub:4444/wd/hub. Also make sure your test port matches the Django runserver port.