Commit Graph

42 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
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
Vanshdeep Singh f13c9a9d57 Problem: Stateful validation doesn't raise double spend exception (#2422)
* Problem: Stateful validation doesn't raise double spend exception

Solution: Transaction.validate should raise exception DoubleSpend if the given
transaction is already a part of the database

* Problem: Double spend exception message not accurate

Solution: The exception message should state that the double spend is because of
spending the same input more than once in the transaction
2018-07-31 14:06:21 +02:00
Muawia Khan 2b39566a4b Problem: Some configurations are defunct (#2338)
* Problem: BigchainDB config has stale/deprecated parameters

- Remove `keyring` and `keypair` from config
- Update tests
- Add `tendermint` config

* Fix flake8

* Update some naming conventions and redundant changes

* Remove redundant routine `fast_query`

* Remove deprecated parameters and descriptions

* remove some more unwanted code

* Problem: Two flake8 errors made Travis fail

Solution: Fix the two flake8 errors

* Address comments

- Remove reference of nodes_except_me and me_private and me
  as attributes of BigchainDB instances
- Update and re-add test(s)
- Do not introduce `tendermint` in configuration instead handle that
  in a separate PR along with docs

* Address comments

- Remove tests that are already covered with 2.0
- Remove tests that are no longer relevant
- Add TODO for more cleanup

* Remove tendermint config from configure command
2018-06-08 15:50:50 +02:00
Lev Berman 89d665c01e Problem: Asset tests are disabled. (#2277)
Solution: Update the tests to work with BigchainDB 2.* and enable them back.
2018-05-15 11:19:47 +02:00
Sylvain Bellemare 9dd2e026b0 Fixes #1891 2017-12-05 19:38:52 +01:00
Scott Sadler 4b060e6488 move tests related to assets 2017-03-14 18:07:25 +01:00
Scott Sadler 7c461e47d7 remove structural and schematic validations from Transaction.validate which is validating the spend 2017-03-14 12:39:57 +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 dbb3414fd0 generalise get_txids_by_asset_id into get_txids_filtered and remove get_transactions_by_asset_id 2017-01-18 15:42:47 +01:00
libscott da69aa11f1 Update test_digital_assets.py
On mobile!
2017-01-16 17:47:51 +01:00
Scott Sadler d9cf4df5e6 duplicate asset id / fix test_get_transactions_by_asset_id 2017-01-16 16:08:15 +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
libscott b2cb426097 Merge pull request #962 from bigchaindb/remove-asset-keywords
Remove asset keywords
2016-12-20 10:02:42 +01:00
Scott Sadler d2827dfae8 remove asset keywords 2016-12-16 13:50:23 +01:00
Sylvain Bellemare 56feefe3f4 Re-work test fixtures - iteration one 2016-12-15 15:54:15 +01:00
Brett Sun 345fc27a39 Remove durability from all database-related calls 2016-12-12 16:07:41 +01:00
Rodolphe Marques e03a547276 Merge remote-tracking branch 'origin/master' into feat/332/get-txs-by-asset-id-ignore-invalid-blocks 2016-11-18 14:50:36 +01:00
Rodolphe Marques aef5dcdf1b fixed typo 2016-11-18 14:40:26 +01:00
Rodolphe Marques 9e1da05103 Fixed some tests 2016-11-17 11:41:54 +01:00
Rodolphe Marques eead7dbdda Merge remote-tracking branch 'origin/master' into feat/746/new-naming-convention-for-keys 2016-11-17 11:41:23 +01:00
Rodolphe Marques b7b9338f21 get_transactions_by_asset_id now ignores invalid transactions 2016-11-11 15:25:59 +01:00
Rodolphe Marques 3909538c62 Replace all occurrences where `vk` is used as a shortcut
for public key and replaced it with `pk`
2016-11-10 17:20:27 +01:00
Rodolphe Marques a2e28ae806 addressed comments 2016-11-09 17:48:39 +01:00
Rodolphe Marques 3ac530617c Fixed some tests 2016-11-06 22:35:39 +01:00
Rodolphe Marques a212aba35b Added validation for amounts
Added a new db call to return an asset instance given the id

Created tests
2016-11-06 20:00:47 +01:00
Rodolphe Marques 63f5879cb2 consolidate Asset model in common 2016-11-04 11:31:07 +01:00
Rodolphe Marques dd382ee4e6 Added ability to `CREATE` divisible assets 2016-11-03 15:57:05 +01:00
Sylvain Bellemare ea9dfaf1e5 Replace bigchaindb_common pkg by bigchaindb.common 2016-10-24 17:01:43 +02:00
Rodolphe Marques 7d3c6ee5ce Addressed comments to import tests.
Fixed some pep8 violations
2016-10-13 13:53:08 +02:00
Rodolphe Marques 80c9cdcb09 Finished integration of digital asset.
Fixed tests
2016-10-12 10:29:25 +02:00
Rodolphe Marques 0652348bf0 initial integration of asset 2016-10-07 15:46:21 +02:00
Rodolphe Marques 7715bbc807 more descriptive unit test name 2016-10-04 16:23:36 +02:00
Rodolphe Marques 148e30a84b Remove unnecessart database queries in get_asset_id 2016-10-04 16:23:36 +02:00
Rodolphe Marques b447a75a8d Added get_txs_by_asset_id
Created secondary index for assets.
Created tests
2016-10-04 16:22:33 +02:00
Rodolphe Marques f10d1d0bcb Small change to the asset template in TRANSFER transactions.
This change is so that both `CREATE` and `TRANSFER` transactions have
the uuid under the same key so that we can create secondary indexes on
it.
2016-10-04 16:19:06 +02:00
Rodolphe Marques 0189ede72e Renamed `asset` to `asset_data`. Added digital asset validation to
validate_transaction

Created and fixed tests.
2016-10-04 16:18:04 +02:00
Rodolphe Marques 475fd0b06b Finished implementing digital asset template
Created util functions.
Created tests.
2016-10-04 15:56:15 +02:00
Rodolphe Marques 7abc25dd6b Implemented digital asset template for `CREATE`.
Added tests
2016-10-04 15:51:56 +02:00