def test_post_creates_record(self):
        self.assertFalse(Unsubscribe.objects.filter(
            address=self.email, source='user').exists())
        request = self.factory.post('/')
        request.GET = {'email': self.email, 'code': self.code}
        response = self.view(request)
        self.assertTrue(Unsubscribe.objects.filter(
            address=self.email, source='user').exists())
        self.assertEqual(response.status_code, 302)
Test that a POST request generates a new Unsubscribe record
dataset/ETHPy150Open ofa/connect/open_connect/mailer/tests/test_views.py/TestUnsubscribeView.test_post_creates_record