Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devkral committed Jan 29, 2024
1 parent 39835c2 commit 06ab017
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@
)


class TestChannelLayer(BaseChannelLayer):
async def send(self, channel: str, message: dict):
raise NotImplementedError()

async def receive(self, channel: str) -> dict:
raise NotImplementedError()

async def new_channel(self, prefix: str = "specific.") -> str:
raise NotImplementedError()


class TestChannelLayerManager(unittest.TestCase):
@override_settings(
CHANNEL_LAYERS={"default": {"BACKEND": "channels.layers.InMemoryChannelLayer"}}
Expand Down Expand Up @@ -72,7 +83,7 @@ async def test_send_receive():

@pytest.mark.parametrize(
"method",
[BaseChannelLayer().valid_channel_name, BaseChannelLayer().valid_group_name],
[TestChannelLayer().valid_channel_name, TestChannelLayer().valid_group_name],
)
@pytest.mark.parametrize(
"channel_name,expected_valid",
Expand Down

0 comments on commit 06ab017

Please sign in to comment.