@mock.patch.object(Site.objects, 'get_current')
    def test_private_message_not_sends_email(self, get_current):
        get_current.return_value.domain = 'testserver'

        s, c = Setting.objects.get_or_create(user=self.to,
                                             name='email_private_messages')
        # Now user should not recieve email.
        s.value = False
        s.save()
        assert not Setting.get_for_user(self.to, 'email_private_messages')

        self.client.login(username=self.sender.username, password='testpass')
        post(self.client, 'messages.new',
             {'to': self.to, 'message': 'a message'})

        assert not mail.outbox
Update the count of each gt type for each sample
dataset/ETHPy150Open mozilla/kitsune/kitsune/messages/tests/test_notifications.py/NotificationsTests.test_private_message_not_sends_email--crossover with--dataset/ETHPy150Open arq5x/gemini/gemini/gemini_load_chunk.py/GeminiLoader._update_sample_gt_counts