Пример #1
0
 def test_no_time(self):
     self.assertEqual(
         parse_client_msg({
             ACTION: PRESENCE,
             USER: {
                 ACCOUNT_NAME: 'Guest'
             }
         }), self.err_dict)
Пример #2
0
 def test_no_action(self):
     self.assertEqual(
         parse_client_msg({
             TIME: '1.1',
             USER: {
                 ACCOUNT_NAME: 'Guest'
             }
         }), self.err_dict)
Пример #3
0
 def test_ok_check(self):
     self.assertEqual(
         parse_client_msg({
             ACTION: PRESENCE,
             TIME: 1.1,
             USER: {
                 ACCOUNT_NAME: 'Guest'
             }
         }), self.corr_dict)
Пример #4
0
 def test_wrong_action(self):
     self.assertEqual(
         parse_client_msg({
             ACTION: 'Wrong',
             TIME: '1.1',
             USER: {
                 ACCOUNT_NAME: 'Guest'
             }
         }), self.err_dict)
Пример #5
0
 def test_no_user(self):
     self.assertEqual(parse_client_msg({
         ACTION: PRESENCE,
         TIME: '1.1'
     }), self.err_dict)