@patch.object(forms, 'Thread')
    def test_save_confirm_is_false_thread_not_updated(self, mock_thread):
        # Make sure Thread isn't called
        form = forms.UnBanUserForm(
            {'user': self.banned_user.pk, 'confirm': False})
        self.assertTrue(form.is_valid())
        form.save()
        self.assertEqual(mock_thread.objects.filter.call_count, 0)

        # Make sure call_count would be 1 if confirm is True.
        form = forms.UnBanUserForm(
            {'user': self.banned_user.pk, 'confirm': True})
        self.assertTrue(form.is_valid())
        form.save()
        self.assertEqual(mock_thread.objects.filter.call_count, 1)
Test that clocking out of a paused entry calculates the correct time
dataset/ETHPy150Open ofa/connect/open_connect/accounts/tests/test_forms.py/UnBanUserFormTest.test_save_confirm_is_false_thread_not_updated--crossover with--dataset/ETHPy150Open caktus/django-timepiece/timepiece/entries/tests/test_timesheet.py/ClockOutTest.testClockOutWhilePaused