Commit Graph

59 Commits

Author SHA1 Message Date
codegeschrei dd84d4eb6f Problem: There are unnecessary markers (#2522)
* Problem: we have unused and outdated fixtures
Solution: clean up fixtures and tests accordingly

* Problem: there are still unused fixtures
Solution: remove Merlin keys

* Problem: There are unnecessary markers
Solution: remove the tendermint marker for tests
2018-09-10 09:53:18 +02:00
Lev Berman 699494613f Problem: The commit mode behaves incorrectly. (#2510)
* Problem: The commit mode behaves incorrectly.

Solution: Parse the Tendermint response properly. The functionality was disabled in https://github.com/bigchaindb/bigchaindb/pull/2235/files#diff-c6511560546a7dc577e7e647b5bfdaceL68 and was not fixed since then.

* Add a test case for the sync mode.

* Do not strictly expect deliver_tx in the response.

* Fix post_mock in web/test_transactions.py.

* Check for the error field first.
2018-09-06 15:49:00 +02:00
codegeschrei 55a9151c14 Problem: tests in test_bigchain_api are not activated (#2456)
* Problem: tests in test_bigchain_api are not activated
Solution: remove or active tests

* Problem: TransactionNotInValidBlock was removed
Solution: remove TransactionNotInValidBlock from tests
2018-08-22 09:56:44 +02:00
Troy McConaghy abdd23f5a6 Problem: Source files contain no license info (#2455)
* Problem: Source files contain no license info

Solution: Add comments with SPDX license info to source files

* Python 3 files don't need # -*- coding: utf-8 -*-
2018-08-16 12:31:32 +02:00
codegeschrei 44be8f572f Problem: Block parameters are not required anymore (#2374)
* Problem: all blocks are valid
Solution: remove the status from transactions

* Problem: changed the return type of get_transaction_filtered
Solution: return tx class instead of dict
2018-08-08 15:08:34 +02:00
Zachary Bowen 2386ca9d71 Refactor tendermint directory to project root (#2401)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness
2018-07-25 16:59:25 +02:00
Zachary Bowen 4d2e58416c Problem: Bigchain class is unused and redundant (#2366)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Merge with master and re-do some changes
2018-07-10 17:34:51 +02:00
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
Lev Berman 2e9c20491c Problem: web transaction tests were broken or disabled. (#2278)
Solution: Fix or reenable the tests after the migration to BigchainDB 2.*.
2018-05-16 15:17:33 +02:00
Vanshdeep Singh 7384a49d9a Problem: Invalid transaction posted to Tendermint (#2270)
* Problem: Amount error is not tested on the HTTP level.

Solution: A failed web test to reproduce the problem.

* Problem: Invalid transaction posted to Tendermint

Solution: Pass the exception to HTTP POST handler function

* Problem: DoubleSpend and CriticalDoubleSpend not differentiated

Solution: Handle these exceptions differently in `get_spent`

* Problem: No test for checking exception DoubleSpend and CriticalDoubleSpend

Solution: Add necessary tests

* Problem: find doesn't raise IndexError

Solution: Remove exception handling for IndexError
2018-05-09 13:41:22 +02:00
Troy McConaghy 1b6d0adc01 removed code for all /statuses endpoints 2018-02-19 12:04:10 +01:00
codegeschrei 411d1963bb requested changes 2018-01-12 11:06:27 +01:00
codegeschrei 06a091e215 add mode parameter to transaction endpoint, fixes #1995 2018-01-11 13:26:06 +01:00
Sylvain Bellemare cb268a3832
Merge branch 'master' into tendermint 2017-12-06 16:59:26 +01:00
Sylvain Bellemare 9dd2e026b0 Fixes #1891 2017-12-05 19:38:52 +01:00
vrde 1e104ad2c4
Merge branch 'master' into tendermint 2017-11-30 18:17:36 +01:00
Katha e377fb57af
Pre commit styling (#1914)
* run pre-commit and fix errors

* mention pre-commit in our guides
2017-11-30 15:04:14 +01:00
vrde 044a052644
Merge branch 'master' into tendermint 2017-11-29 17:18:00 +01:00
Sylvain Bellemare 35012a6452 Fix flake8 errors 2017-11-29 16:55:32 +01:00
kansi 6c3f176122 Integrate asset search 2017-11-23 21:28:51 +05:30
kansi 95c0f267e0 Integrate api GET "/transactions?asset_id={asset_id}&operation=" 2017-11-23 16:27:35 +01:00
kansi 8310b04b17 Merge branch 'master' into bug/1670/asset-language-api-fix 2017-11-03 11:38:09 +05:30
kansi f3da30aea0 Validate nested keys for asset.data and metadata 2017-11-01 17:26:16 +05:30
kansi cd636101a7 Support abbreviated values for "language" 2017-10-31 16:54:47 +05:30
kansi 1de5375962 Validate asset data keys 2017-10-31 15:16:59 +05:30
kansi 7226584215 Api fix for asset language 2017-10-31 10:12:16 +05:30
Ketan Bhatt 684fffe917 HTTP API Logger logs request path and method too 2017-07-09 16:44:21 +05:30
Sylvain Bellemare 02fe712c34 Integrate cryptoconditions version 02 2017-06-22 14:56:22 +02:00
tim eb791aa2ce Include Location header in POST /transactions 2017-06-14 16:53:22 +02:00
tim 6cedab47a1 /transactions/ID only returns VALID transactions 2017-06-14 15:42:04 +02:00
Sylvain Bellemare 43f779a18b Add logging infrastructure 2017-03-20 13:54:14 +01:00
Scott Sadler a3fccbc599 change TransactionDoesNotExist to InputDoesNotExist in tests 2017-03-08 13:01:52 +01:00
Scott Sadler 5584de59b0 Make ValidationError a superclass of all validation errors and use it 2017-03-03 11:36:50 +01:00
Scott Sadler 57d7a3d850 fix some outstanding flake8 issues 2017-02-22 12:33:10 +01:00
Scott Sadler 7af9975081 return 202 on successful transaction POST 2017-01-25 12:23:36 +01:00
libscott a7a163fd3c Merge pull request #1083 from bigchaindb/single-quotes
Add flake8-quotes checker and cleanup double quotes
2017-01-24 12:07:29 +01:00
Sylvain Bellemare fe5d966dca Put back some strings with wrapped single quotes
just to double check that flake8-quotes does indeed tolerate it
2017-01-24 10:22:32 +01:00
Scott Sadler bd048a3115 add flake8-quotes checker and cleanup double quotes 2017-01-23 17:30:37 +01:00
Scott Sadler a5acd0c7b9 document patching technique in get_transactions_filtered web view test 2017-01-23 14:07:22 +01:00
Scott Sadler 2ec23be05d fix flake8 2017-01-18 17:13:38 +01:00
Scott Sadler ae14d0e5c4 api method to get transactions by asset_id 2017-01-18 15:43:53 +01:00
Sylvain Bellemare 1dbc998b36 Only fetch needed element (public key) 2017-01-17 07:50:00 -05:00
Sylvain Bellemare 5759de6ae3 Remove unused fixture 2017-01-17 07:50:00 -05:00
Sylvain Bellemare 9766aa90a1 Addresses #663 partially 2017-01-17 07:50:00 -05:00
diminator 8aa37277c2
remove blank line for travis 2017-01-11 17:17:20 +01:00
diminator 7124adcd34
implement statuses endpoint 2017-01-06 15:55:07 +01:00
Scott Sadler 04a78aacec Merge remote-tracking branch 'origin/master' into inputs-outputs 2016-12-22 13:45:02 +01:00
Brett Sun 9319583ab4 Remove Asset and AssetLink (#982)
* Remove asset.validate_asset and move its validation checks to other areas

* Move Asset.get_asset_id to Transaction

* Remove Asset and AssetLink models

* Add test against creating TRANSFER transactions with bad asset
2016-12-22 10:19:21 +01:00
Sylvain Bellemare fa79fe6783 Add session scope test setup for config and db
resolves #966
2016-12-20 20:37:28 +01:00
libscott 7e33f2bd52 Tx ID as Asset ID (#926)
* Allow AssetLinks to be used in place of Assets in the Transaction Model and enforce `Transaction.transfer()` to only take an AssetLink

* Remove AssetLink's inheritance from Asset

* Remove id from the Asset model

* Fix get_txids_by_asset_id query for rethinkdb after removing asset's uuid

Because `CREATE` transactions don't have an asset that contains an id
anymore, one way to find all the transactions related to an asset is to
query the database twice: once for the `CREATE` transaction and another
for the `TRANSFER` transactions.

* Add TODO notice for vote test utils to be fixtures

* Update asset model documentation to reflect usage of transaction id

* Fix outdated asset description in transaction schema
2016-12-20 17:28:15 +01:00