def test_validate_invalid_json(self): """Tests that validate raises BadValueError with invalid JSON""" with self.assertRaises(BadValueError): models.validate_messages(None, '#$@%P(@U#RP(QU@#P(UQ@# CP(U#P((____)')
def test_validate_invalid_messages_str(self): """Tests that validate only accepts JSON dicts""" with self.assertRaises(BadValueError): models.validate_messages(None, '[]')
def test_validate_message_empty_message(self): """Tests that validate_msessages does not accept empty messages""" with self.assertRaises(BadValueError): models.validate_messages(None, None)