示例#1
0
 def test_without_user(self):
     self.assertEqual(
         handle_message(
             {
                 self.CONFIGS['ACTION']: self.CONFIGS['PRESENCE'],
                 self.CONFIGS['TIME']: '1.1',
             }, self.CONFIGS), self.error_message)
示例#2
0
 def test_without_time(self):
     self.assertEqual(
         handle_message(
             {
                 self.CONFIGS['ACTION']: self.CONFIGS['PRESENCE'],
                 self.CONFIGS['USER']: {
                     self.CONFIGS['ACCOUNT_NAME']: 'Guest'
                 },
             }, self.CONFIGS), self.error_message)
示例#3
0
 def test_without_action(self):
     self.assertEqual(
         handle_message(
             {
                 self.CONFIGS['TIME']: '1.1',
                 self.CONFIGS['USER']: {
                     self.CONFIGS['ACCOUNT_NAME']: 'Guest'
                 }
             }, self.CONFIGS), self.error_message)
示例#4
0
 def test_wrong_user(self):
     self.assertEqual(
         handle_message(
             {
                 self.CONFIGS['ACTION']: self.CONFIGS['PRESENCE'],
                 self.CONFIGS['TIME']: 1.1,
                 self.CONFIGS['USER']: {
                     self.CONFIGS['ACCOUNT_NAME']: 'Guest1'
                 }
             }, self.CONFIGS), self.error_message)
示例#5
0
 def test_wrong_action(self):
     self.assertEqual(
         handle_message(
             {
                 self.CONFIGS['ACTION']: 'Wrong',
                 self.CONFIGS['TIME']: '1.1',
                 self.CONFIGS['USER']: {
                     self.CONFIGS['ACCOUNT_NAME']: 'Guest'
                 },
             }, self.CONFIGS), self.error_message)