def test_no_time(self): self.assertEqual( parse_client_msg({ ACTION: PRESENCE, USER: { ACCOUNT_NAME: 'Guest' } }), self.err_dict)
def test_no_action(self): self.assertEqual( parse_client_msg({ TIME: '1.1', USER: { ACCOUNT_NAME: 'Guest' } }), self.err_dict)
def test_ok_check(self): self.assertEqual( parse_client_msg({ ACTION: PRESENCE, TIME: 1.1, USER: { ACCOUNT_NAME: 'Guest' } }), self.corr_dict)
def test_wrong_action(self): self.assertEqual( parse_client_msg({ ACTION: 'Wrong', TIME: '1.1', USER: { ACCOUNT_NAME: 'Guest' } }), self.err_dict)
def test_no_user(self): self.assertEqual(parse_client_msg({ ACTION: PRESENCE, TIME: '1.1' }), self.err_dict)