bigchaindb/tests/backend/test_connection.py
Lev Berman 89b28b8471 Remove unsupported backends (#2289)
* Problem: RethinkDB, change feed, old mongo, admin interface are not supported any longer.

Solution: Remove unsupported functionality. Bring the MongoDB backend implementation completely to the localmongodb package. Fix the test setup.

* Problem: Nothing depends on multipipes any longer.

Solution: Remove multipipes from setup.py.

* Problem: The how-to-run-tests doc uses --database-backend.

Solution: Do not include the --database-backend option into the documented pytest usage.

* Problem: The backends docs are outdated.

Solution: Document MongoDB as the default and only backend for BigchainDB.

* Problem: The inputs fixtures uses old blocks API.

Solution: Change the inputs fixtures to use the new blocks API.

* Problem: rethinkdb package is not used anymore.

Solution: Remove the rethinkdb dependency from setup.py.

* Problem: The abci-marked tests use outdated Mongo conn.

Solution: Replace MongoDBConnection with LocalMongoDBConnection for them.
2018-05-23 11:34:00 +02:00

21 lines
668 B
Python

import pytest
pytestmark = pytest.mark.tendermint
def test_get_connection_raises_a_configuration_error(monkeypatch):
from bigchaindb.common.exceptions import ConfigurationError
from bigchaindb.backend import connect
with pytest.raises(ConfigurationError):
connect('msaccess', 'localhost', '1337', 'mydb')
with pytest.raises(ConfigurationError):
# We need to force a misconfiguration here
monkeypatch.setattr('bigchaindb.backend.connection.BACKENDS',
{'catsandra':
'bigchaindb.backend.meowmeow.Catsandra'})
connect('catsandra', 'localhost', '1337', 'mydb')