mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-10 20:05:02 +02:00
17 lines
473 B
Python
17 lines
473 B
Python
|
|
||
|
def test_get_connection_returns_the_correct_instance():
|
||
|
from bigchaindb.backend import connect
|
||
|
from bigchaindb.backend.connection import Connection
|
||
|
from bigchaindb.backend.mongodb.connection import MongoDBConnection
|
||
|
|
||
|
config = {
|
||
|
'backend': 'mongodb',
|
||
|
'host': 'localhost',
|
||
|
'port': 27017,
|
||
|
'name': 'test'
|
||
|
}
|
||
|
|
||
|
conn = connect(**config)
|
||
|
assert isinstance(conn, Connection)
|
||
|
assert isinstance(conn, MongoDBConnection)
|