Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -2,7 +2,8 @@
Loading
2 2
    post_delete,
3 3
    post_save,
4 4
    pre_delete,
5 -
    pre_save
5 +
    pre_save,
6 +
    m2m_changed
6 7
)
7 8
from django.db import transaction
8 9
from .utils import groupSendSync
@@ -36,6 +37,8 @@
Loading
36 37
    model = None
37 38
    stream = None
38 39
    serializer = None
40 +
    # optionally also connect to releated m2m fields
41 +
    m2m_senders = []
39 42
40 43
    # the kwargs the triggering signal (e.g. post_save) was emitted with
41 44
    signal_kwargs = None
@@ -50,10 +53,20 @@
Loading
50 53
        pre_delete.connect(cls.pre_delete_receiver, sender=cls.model)
51 54
        post_delete.connect(cls.post_delete_receiver, sender=cls.model)
52 55
56 +
        for sender in cls.m2m_senders:
57 +
            m2m_changed.connect(cls.m2m_changed_receiver, sender=sender)
58 +
53 59
        cls.model_label = f'{cls.model._meta.app_label.lower()}.{cls.model._meta.object_name.lower()}'
54 60
55 61
    # Outbound binding
56 62
63 +
    @classmethod
64 +
    def m2m_changed_receiver(cls, instance, action, **kwargs):
65 +
        if action.startswith('pre_'):
66 +
            cls.pre_change_receiver(instance, UPDATE, **kwargs)
67 +
        else:
68 +
            cls.post_change_receiver(instance, UPDATE, **kwargs)
69 +
57 70
    @classmethod
58 71
    def pre_save_receiver(cls, instance, **kwargs):
59 72
        creating = instance._state.adding
@@ -82,7 +95,7 @@
Loading
82 95
        cls.post_change_receiver(instance, DELETE, **kwargs)
83 96
84 97
    @classmethod
85 -
    def pre_change_receiver(cls, instance, action):
98 +
    def pre_change_receiver(cls, instance, action, **kwargs):
86 99
        """
87 100
        Entry point for triggering the binding from save signals.
88 101
        """
Files Coverage
channels_oneway 96.67%
Project Totals (3 files) 96.67%
11.2
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
11.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
12.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
12.2
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading