'Verify that account correct activation message is displayed.
If logged in user has not activated his/her account, make sure that an
account activation message is displayed on dashboard sidebar.'

@override_settings(FEATURES=dict(settings.FEATURES, DISPLAY_ACCOUNT_ACTIVATION_MESSAGE_ON_SIDEBAR=True))
def test_account_activation_message(self):

    self.login()
    expected_message = render_to_string('registration/account_activation_sidebar_notice.html', {'email': self.user.email, 'platform_name': self.platform_name, 'activation_email_support_link': self.activation_email_support_link})
    response = self.client.get(reverse('dashboard'))
    self.assertContains(response, expected_message, html=True)
    self.user.is_active = True
    self.user.save()
    self.login()
    expected_message = render_to_string('registration/account_activation_sidebar_notice.html', {'email': self.user.email, 'platform_name': self.platform_name, 'activation_email_support_link': self.activation_email_support_link})
    response = self.client.get(reverse('dashboard'))
    self.assertNotContains(response, expected_message, html=True)
