def test_validate_non_existant_dataset_id(self, mock_query): mock_query.exists.return_value = False serializer = MLModelSerializer() with self.assertRaises(ValidationError): serializer.validate_dataset_id('invalid')
def test_validate_invalid_id(self): serializer = MLModelSerializer() with self.assertRaises(ValidationError): serializer.validate_dataset_id('invalid')