def test_save(self):
        user = mommy.make('accounts.User')
        form = forms.TermsAndConductAcceptForm(
            {'accept_tos': 'yes', 'accept_ucoc': 'yes', 'next': '/'}
        )
        self.assertTrue(form.is_valid())
        user = form.save(user.pk)
        self.assertIsInstance(user.tos_accepted_at, datetime)
        self.assertIsInstance(user.ucoc_accepted_at, datetime)
Test saving the form
dataset/ETHPy150Open ofa/connect/open_connect/accounts/tests/test_forms.py/TermsAndConductAcceptFormTest.test_save