diff --git a/channels/binding/base.py b/channels/binding/base.py index fb117ee..85ec720 100644 --- a/channels/binding/base.py +++ b/channels/binding/base.py @@ -142,7 +142,7 @@ class Binding(object): if action == CREATE: group_names = set() else: - group_names = set(cls.group_names(instance, action)) + group_names = set(cls.group_names(instance)) if not hasattr(instance, '_binding_group_names'): instance._binding_group_names = {} @@ -157,7 +157,7 @@ class Binding(object): if action == DELETE: new_group_names = set() else: - new_group_names = set(cls.group_names(instance, action)) + new_group_names = set(cls.group_names(instance)) # if post delete, new_group_names should be [] self = cls() @@ -186,7 +186,7 @@ class Binding(object): group.send(message) @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): """ Returns the iterable of group names to send the object to based on the instance and action performed on it. diff --git a/channels/tests/test_binding.py b/channels/tests/test_binding.py index 2383cfb..6b32a02 100644 --- a/channels/tests/test_binding.py +++ b/channels/tests/test_binding.py @@ -21,7 +21,7 @@ class TestsBinding(ChannelTestCase): fields = ['username', 'email', 'password', 'last_name'] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ["users"] def has_permission(self, user, action, pk): @@ -62,7 +62,7 @@ class TestsBinding(ChannelTestCase): exclude = ['first_name', 'last_name'] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ["users_exclude"] def has_permission(self, user, action, pk): @@ -105,7 +105,7 @@ class TestsBinding(ChannelTestCase): stream = 'test' @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ["users_omit"] def has_permission(self, user, action, pk): @@ -119,7 +119,7 @@ class TestsBinding(ChannelTestCase): fields = ['__all__'] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ["users2"] def has_permission(self, user, action, pk): @@ -164,7 +164,7 @@ class TestsBinding(ChannelTestCase): fields = ['username'] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ["users3"] def has_permission(self, user, action, pk): @@ -203,7 +203,7 @@ class TestsBinding(ChannelTestCase): fields = ['username', 'email', 'password', 'last_name'] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ['users_outbound'] def has_permission(self, user, action, pk): @@ -243,7 +243,7 @@ class TestsBinding(ChannelTestCase): fields = ['username', ] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ['users_outbound'] def has_permission(self, user, action, pk): @@ -289,7 +289,7 @@ class TestsBinding(ChannelTestCase): fields = ['username', ] @classmethod - def group_names(cls, instance, action): + def group_names(cls, instance): return ['users_outbound'] def has_permission(self, user, action, pk):