StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/backend/venv/lib/python3.7/site-packages/flask_pymongo/tests/test_url_converter.py

17 lines
605 B

from bson import ObjectId
from werkzeug.exceptions import NotFound
from flask_pymongo import BSONObjectIdConverter
from flask_pymongo.tests.util import FlaskPyMongoTest
class UrlConverterTest(FlaskPyMongoTest):
def test_bson_object_id_converter(self):
converter = BSONObjectIdConverter("/")
self.assertRaises(NotFound, converter.to_python, ("132"))
assert converter.to_python("4e4ac5cfffc84958fa1f45fb") == \
ObjectId("4e4ac5cfffc84958fa1f45fb")
assert converter.to_url(ObjectId("4e4ac5cfffc84958fa1f45fb")) == \
"4e4ac5cfffc84958fa1f45fb"