Beispiel #1
0
 def test_message_is_from_admin_false_if_not_lowercase(
         self, mock_get_user_from_message):
     settings.ADMINS = ['WoOh']
     mock_get_user_from_message.return_value = self.message
     self.assertFalse(RosterMixin().message_is_from_admin(self.message))
Beispiel #2
0
 def test_message_is_from_admin_true_if_enlisted(
         self, mock_get_user_from_message):
     settings.ADMINS = ['wooh']
     mock_get_user_from_message.return_value = self.message
     self.assertTrue(RosterMixin().message_is_from_admin(self.message))
Beispiel #3
0
 def test_message_is_from_admin_false_if_not_enlisted(
         self, mock_get_user_from_message):
     settings.ADMINS = ['skoczen']
     mock_get_user_from_message.return_value = self.message
     self.assertFalse(RosterMixin().message_is_from_admin(self.message))
Beispiel #4
0
 def test_message_is_from_admin_true_if_not_set(self,
                                                mock_get_user_from_message):
     settings.ADMINS = '*'
     mock_get_user_from_message.return_value = self.message
     self.assertTrue(RosterMixin().message_is_from_admin(self.message))