bigchaindb/tests/backend/test_generics.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

39 lines
1005 B
Python

import pytest
from pytest import mark, raises
pytestmark = pytest.mark.tendermint
@mark.parametrize('schema_func_name,args_qty', (
('create_database', 1),
('create_tables', 1),
('create_indexes', 1),
('drop_database', 1),
))
def test_schema(schema_func_name, args_qty):
from bigchaindb.backend import schema
schema_func = getattr(schema, schema_func_name)
with raises(NotImplementedError):
schema_func(None, *range(args_qty))
@mark.parametrize('query_func_name,args_qty', (
('delete_transactions', 1),
('get_txids_filtered', 1),
('get_owned_ids', 1),
('get_block', 1),
('get_spent', 2),
('get_spending_transactions', 1),
('store_assets', 1),
('get_asset', 1),
('store_metadatas', 1),
('get_metadata', 1),
))
def test_query(query_func_name, args_qty):
from bigchaindb.backend import query
query_func = getattr(query, query_func_name)
with raises(NotImplementedError):
query_func(None, *range(args_qty))