'We provide one-click unsubscribe links in missed message
e-mails that you can click even when logged out to update your
email notification settings.'

def test_missedmessage_unsubscribe(self):

    user_profile = self.example_user('hamlet')
    user_profile.enable_offline_email_notifications = True
    user_profile.save()
    unsubscribe_link = one_click_unsubscribe_link(user_profile, 'missed_messages')
    result = self.client_get(urllib.parse.urlparse(unsubscribe_link).path)
    self.assertEqual(result.status_code, 200)
    user_profile = UserProfile.objects.get(email=self.example_email('hamlet'))
    self.assertFalse(user_profile.enable_offline_email_notifications)
