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)
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)
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)
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)
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)