399 Commits

Author SHA1 Message Date
Brett Sun
af243907dd Fix wrong argument order for python 3.4 2016-12-12 15:53:56 +01:00
Brett Sun
ae52e015ce Fix changefeed tests that were mocking the wrong thing 2016-12-12 15:53:56 +01:00
Brett Sun
8ffdd6a2ce Fix rethinkdb schema index test 2016-12-12 15:53:56 +01:00
Brett Sun
9a7e695e18 Fix tests still relying on being able to access removed attribute of the Bigchain class 2016-12-12 15:48:48 +01:00
Brett Sun
ccd8e74868 Fix initialization-related tests for rethinkdb schema 2016-12-12 15:48:48 +01:00
Brett Sun
32b6c50d63 Fix usage of backend functions that weren't getting a connection passed in 2016-12-12 15:48:48 +01:00
Brett Sun
8caeed54bf Fix backend module dispatch error tests broken from renaming 2016-12-12 15:48:48 +01:00
Brett Sun
2657226573 Fix Bigchain class tests due to changes to internal attributes 2016-12-12 15:48:48 +01:00
Brett Sun
597cd778e9 Fix interactive drop database commands 2016-12-12 15:48:48 +01:00
Brett Sun
dc31f7f607 Fix small module issues related to rethinkdb schema tests 2016-12-12 15:48:48 +01:00
Brett Sun
108b5cba30 Fix tests broken by adding a 'backend' key to the config 2016-12-12 15:48:48 +01:00
Brett Sun
da71b3d84b Fix backend module dispatch decorator tests broken from renaming 2016-12-12 15:48:48 +01:00
Brett Sun
941b47d1ac Fix misc tests affected by changes related to database abstraction 2016-12-12 15:48:48 +01:00
Brett Sun
9e3bca7e85 Fix schema-related database tests 2016-12-12 15:48:48 +01:00
Brett Sun
9ca7f9f270 Move tests/db/test_utils.py to rethinkdb-only schema test 2016-12-12 15:48:48 +01:00
Brett Sun
fc533bb158 Fix tests for bigchaindb commands 2016-12-12 15:48:48 +01:00
Sylvain Bellemare
b8bc1a5af9 Rename test module to plural form --> utils 2016-12-12 15:48:48 +01:00
Sylvain Bellemare
8c1dbc86a0 Import std libs at the top
the rationale behind importing under a test function is to import what
is being tested, and perhasp likely to fail, to isolate possible errors
resulting from the import itself

see
http://docs.pylonsproject.org/en/latest/community/testing.html#rule-never-import-the-module-under-test-at-test-module-scope for more
2016-12-12 15:48:48 +01:00
Brett Sun
daa0fe1f51 Add utility decorator for registering backend dispatches based on modules 2016-12-12 15:48:48 +01:00
vrde
26c844ec22 Add defaults, fix import 2016-12-12 15:47:43 +01:00
vrde
2fd0aeca9f Add error handling 2016-12-12 15:47:43 +01:00
vrde
53fb9f3d5f Add connection Class 2016-12-12 15:47:43 +01:00
Scott Sadler
a635838c58 few style changes for vote-schema.py 2016-12-12 15:15:38 +01:00
Scott Sadler
4f83fce39d address some PR comments on coding style 2016-12-12 15:15:38 +01:00
libscott
d9bc90e5aa Imports inside tests in test_consensus.py 2016-12-12 15:15:38 +01:00
Scott Sadler
94df6fc00a merge test_schema tests and tweak Data Models documentation index 2016-12-12 15:15:38 +01:00
Scott Sadler
d7e0009ce5 Drop definitions from schemas since they clutter log output 2016-12-12 15:15:38 +01:00
Scott Sadler
7453e57e7b remove descriptions from yaml schemas loaded for validating in order to reduce noise in error descriptions 2016-12-12 15:15:38 +01:00
Scott Sadler
f2e6e4d13d add tests to get coverage of consensus.py 2016-12-12 15:15:38 +01:00
Scott Sadler
f38028d727 basic tests for vote schema validator 2016-12-12 15:15:38 +01:00
Scott Sadler
bfb5be3ba4 refactor schema tests into separate modules 2016-12-12 15:15:38 +01:00
Scott Sadler
44a43dcf94 make all tests pass after vote schema introduction 2016-12-12 15:15:38 +01:00
Scott Sadler
c43bf10151 add call to vote schema validate in consensus.py 2016-12-12 15:15:38 +01:00
Scott Sadler
fc88c36ee5 Merge remote-tracking branch 'origin/master' into remove-cid-fid 2016-12-09 10:42:32 +01:00
Sylvain Bellemare
6f90c8f3df Add tests for HTTP API returned errors 2016-12-08 16:50:56 +01:00
Ryan Henderson
1223695b36 add integration tests (#614) 2016-12-08 11:42:46 +01:00
Troy McConaghy
bd6b9da080 Merge pull request #821 from bigchaindb/issue/780/remove-api-endpoint-setting
Removed the "api_endpoint" setting from everywhere (in this repo)
2016-12-06 17:33:14 +01:00
Sylvain Bellemare
9dacc12b3c Handle transaction schema validation errors
in POST /transactions
2016-12-02 14:32:18 +01:00
troymc
adde84970f Fixed merge conflict in bigchaindb/__init__.py 2016-12-01 16:09:34 +01:00
Scott Sadler
8d4677f456 flatten transaction - code changes 2016-12-01 14:31:31 +01:00
Scott Sadler
ec38d06856 add test to make sure documentation can build 2016-11-30 16:41:24 +01:00
Scott Sadler
18d018519f remove Condition.cid and Fulfillment.fid in favour of dereferencing conditions and fulfillments by their location in their respective arrays 2016-11-29 09:59:43 +01:00
Scott Sadler
a6eb52d76d disallow empty metadata dict in favour of null 2016-11-28 17:34:46 +01:00
Scott Sadler
71dcee019f Remove metadata uuid 2016-11-28 17:34:46 +01:00
vrde
024c8583b5
Merge remote-tracking branch 'origin/isolate-db-testcalls' 2016-11-28 16:29:23 +01:00
Rodolphe Marques
a824e275e0 decode signature to a str 2016-11-25 16:00:20 +01:00
libscott
957a548465 Merge pull request #846 from bigchaindb/fix-stale-pipeline-bug
Fix race condition in test_stale_monitor.py:test_full_pipeline
2016-11-24 09:53:26 +01:00
ryan
9ab0294bc9 partial removal of rethinkdb calls from tests 2016-11-22 14:47:11 +01:00
Scott Sadler
7dc9f52fe0 remove transaction timestamp 2016-11-22 13:03:30 +01:00
libscott
8343bab89f Schema definition (#798)
Commit messages for posterity:

* wip transaction schema definition
* test for SchemaObject
* test SchemaObject definions meta property
* schema documentation updates
* test for basic validation
* commit before change to .json file definiton + rst generation
* move to straight .json schema, test for additionalProperties on each object
* add asset to transaction definiton
* remove outdated tx validation
* make all tests pass
* create own exception for validation error and start validating transactions
* more tx validation fixes
* move to yaml file for schema
* automatic schema documentation generator
* remove redundant section
* use YAML safe loading
* change current_owners to owners_before in tx schema
* re-run tests and make correct yaml schema
* fix some broken tests
* update Release_Process.md
* move tx validation into it's own method
* add jsonschema dependency
* perform schema validation after ID validation on Transaction
* Release_Process.md, markdown auto numbering
* remove old transaction.json
* resolve remaining TODOs in schema docuementation
* add `id` and `$schema` to transaction.yaml
* add transaction.yaml to setup.py so it gets copied
* address some concernes in PR for transaction.yaml
* address more PR concerns in transaction.yaml
* refactor validtion exceptions and move transaction schema validation into it's own function in bigchaindb.common.schema.__init__
* add note to generated schema.rst indicating when and how it's generated
* move tx schema validation back above ID validation in Transaction.validate_structure, test that structurally invalid transaction gets caught and 400 returned in TX POST handler
* remove timestamp from transaction schema index
* Add README.md to bigchaindb.common.schema for introduction to JSON Schema and reasons for YAML
* Use constant for schema definitions' base prefix
* Move import of ValidationError exception into only the tests that require it
* Move validate transaction test helper to tests/common/util.py
* move ordered transaction schema load to generate_schema_documentation.py where it's needed
* use double backticks to render terms in schema docs
* change more backticks and change transaction version description in transaction schema
* make details a mandatory property of condition
* Many more documentation fixes
* rename schema.rst to schema/transaction.rst
* Fix documentation for Metadata
* Add more links to documentation
* Various other documentation fixes
* Rename section titles in rendered documentation
* use  to manage file handle
* fix extrenuous comma in test_tx_serialization_with_incorrect_hash args
* 'a' * 64
* remove schema validation until we can analyze properly impact on downstream consumers
* fix flake8 error
* use `with` always
2016-11-22 11:17:06 +01:00