def test_get_unspent_outputs(db_context, utxoset): from bigchaindb.backend import query cursor = query.get_unspent_outputs(db_context.conn) assert cursor.count() == 3 retrieved_utxoset = list(cursor) unspent_outputs, utxo_collection = utxoset assert retrieved_utxoset == list( utxo_collection.find(projection={'_id': False})) assert retrieved_utxoset == unspent_outputs