--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,8 +1,17 @@
 import os
+import sys
+from unittest.mock import MagicMock
 
 import pytest
 from django.conf import settings
 
+# channels.testing.live imports daphne, which is not installed for tests.
+# Stub it out so that channels.testing (imported by most test modules for
+# WebsocketCommunicator/HttpCommunicator) stays importable; its only real
+# user, ChannelsLiveServerTestCase, is used solely by the ignored
+# selenium tests in tests/sample_project.
+sys.modules["channels.testing.live"] = MagicMock()
+
 
 def pytest_configure():
     os.environ["DJANGO_SETTINGS_MODULE"] = "tests.sample_project.config.settings"
