mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
remove unnecessary test
This commit is contained in:
parent
927e57beba
commit
86542fd745
@ -68,33 +68,6 @@ def test_changefeed_class(changefeed_class_func_name, args_qty):
|
|||||||
changefeed_class_func(None, *range(args_qty))
|
changefeed_class_func(None, *range(args_qty))
|
||||||
|
|
||||||
|
|
||||||
@patch('bigchaindb.backend.schema.create_indexes',
|
|
||||||
autospec=True, return_value=None)
|
|
||||||
@patch('bigchaindb.backend.schema.create_tables',
|
|
||||||
autospec=True, return_value=None)
|
|
||||||
@patch('bigchaindb.backend.schema.create_database',
|
|
||||||
autospec=True, return_value=None)
|
|
||||||
def test_init_database(mock_create_database, mock_create_tables,
|
|
||||||
mock_create_indexes):
|
|
||||||
from bigchaindb.backend.schema import init_database
|
|
||||||
from bigchaindb.backend.rethinkdb.connection import RethinkDBConnection
|
|
||||||
from bigchaindb.backend.mongodb.connection import MongoDBConnection
|
|
||||||
|
|
||||||
# rethinkdb
|
|
||||||
conn = RethinkDBConnection('host', 'port', 'dbname')
|
|
||||||
init_database(connection=conn, dbname='mickeymouse')
|
|
||||||
mock_create_database.assert_called_with(conn, 'mickeymouse')
|
|
||||||
mock_create_tables.assert_called_with(conn, 'mickeymouse')
|
|
||||||
mock_create_indexes.assert_called_with(conn, 'mickeymouse')
|
|
||||||
|
|
||||||
# mongodb
|
|
||||||
conn = MongoDBConnection('host', 'port', 'dbname', replicaset='rs')
|
|
||||||
init_database(connection=conn, dbname='mickeymouse')
|
|
||||||
mock_create_database.assert_called_with(conn, 'mickeymouse')
|
|
||||||
mock_create_tables.assert_called_with(conn, 'mickeymouse')
|
|
||||||
mock_create_indexes.assert_called_with(conn, 'mickeymouse')
|
|
||||||
|
|
||||||
|
|
||||||
@mark.parametrize('admin_func_name,kwargs', (
|
@mark.parametrize('admin_func_name,kwargs', (
|
||||||
('get_config', {'table': None}),
|
('get_config', {'table': None}),
|
||||||
('reconfigure', {'table': None, 'shards': None, 'replicas': None}),
|
('reconfigure', {'table': None, 'shards': None, 'replicas': None}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user