Skip to content

Commit 06ab017

Browse files
committed
fix tests
1 parent 39835c2 commit 06ab017

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/test_layers.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
)
1414

1515

16+
class TestChannelLayer(BaseChannelLayer):
17+
async def send(self, channel: str, message: dict):
18+
raise NotImplementedError()
19+
20+
async def receive(self, channel: str) -> dict:
21+
raise NotImplementedError()
22+
23+
async def new_channel(self, prefix: str = "specific.") -> str:
24+
raise NotImplementedError()
25+
26+
1627
class TestChannelLayerManager(unittest.TestCase):
1728
@override_settings(
1829
CHANNEL_LAYERS={"default": {"BACKEND": "channels.layers.InMemoryChannelLayer"}}
@@ -72,7 +83,7 @@ async def test_send_receive():
7283

7384
@pytest.mark.parametrize(
7485
"method",
75-
[BaseChannelLayer().valid_channel_name, BaseChannelLayer().valid_group_name],
86+
[TestChannelLayer().valid_channel_name, TestChannelLayer().valid_group_name],
7687
)
7788
@pytest.mark.parametrize(
7889
"channel_name,expected_valid",

0 commit comments

Comments
 (0)