def test_it_sets_channel_last_error(self):
    self.channel.email_verified = False
    self.channel.save()
    self.client.login(username='example@example.com', password='password')
    r = self.client.post(self.url, {}, follow=True)
    self.assertContains(r, 'Could not send a test notification')
    self.assertContains(r, 'Email not verified')
    self.channel.refresh_from_db()
    self.assertEqual(self.channel.last_error, 'Email not verified')
def test_it_sets_channel_last_error(self):
    self.channel.email_verified = False
    self.channel.save()
    self.client.login(username='example@example.com', password='password')
    r = self.client.post(self.url, {}, follow=True)
    self.assertContains(r, 'Could not send a test notification')
    self.assertContains(r, 'Email not verified')
    self.channel.refresh_from_db()
    self.assertEqual(self.channel.last_error, 'Email not verified')