We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de35cc8 commit 72fdfddCopy full SHA for 72fdfdd
flask_pymongo/tests/test_config.py
@@ -46,6 +46,12 @@ def test_config_with_uri_passed_directly(self):
46
assert mongo.db.name == self.dbname
47
assert ("localhost", self.port) == mongo.cx.address
48
49
+ def test_it_fails_with_no_uri(self):
50
+ self.app.config.pop("MONGO_URI", None)
51
+
52
+ with pytest.raises(ValueError):
53
+ flask_pymongo.PyMongo(self.app)
54
55
def test_multiple_pymongos(self):
56
uri1 = "mongodb://localhost:{}/{}".format(self.port, self.dbname)
57
uri2 = "mongodb://localhost:{}/{}".format(self.port, self.dbname + "2")
0 commit comments