From fcda1b96ef358bf8cbb91d658f49840ae8701849 Mon Sep 17 00:00:00 2001
From: Holger Nahrstaedt <holger@nahrstaedt.de>
Date: Sat, 3 Mar 2018 15:03:46 +0100
Subject: [PATCH] Code and coverage improments part II

---
 .circleci/config.yml                   |  2 +-
 .coverage.t430s.7808.287497            |  1 +
 .coveragerc                            | 20 +++++------
 beem/transactionbuilder.py             |  6 ++--
 beembase/memo.py                       |  3 +-
 beemgraphenebase/account.py            |  6 ++--
 beemgraphenebase/base58.py             |  6 ++--
 beemgraphenebase/ecdsasig.py           |  9 +++--
 beemgraphenebase/signedtransactions.py |  3 +-
 beemgraphenebase/types.py              | 20 ++++++-----
 docs/requirements.txt                  | 20 ++++++++---
 setup.py                               |  4 +--
 tests/beemgraphene/test_account.py     |  1 +
 tests/test_account.py                  |  1 -
 tests/test_block.py                    | 49 ++++++++++++++++++++++++++
 tests/test_blockchain.py               | 42 ++++++++++++++++++++++
 tox.ini                                | 19 +++++-----
 17 files changed, 162 insertions(+), 50 deletions(-)
 create mode 100644 .coverage.t430s.7808.287497
 create mode 100644 tests/test_block.py
 create mode 100644 tests/test_blockchain.py

diff --git a/.circleci/config.yml b/.circleci/config.yml
index e63c3f99..6339f0a1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -42,7 +42,7 @@ jobs:
       - run:
           name: run tests
           command: |
-            tox -e py36,pyflakes,coverage
+            tox -e py36,pylint
 
       - deploy:
           name: Push coverage
diff --git a/.coverage.t430s.7808.287497 b/.coverage.t430s.7808.287497
new file mode 100644
index 00000000..76e02c93
--- /dev/null
+++ b/.coverage.t430s.7808.287497
@@ -0,0 +1 @@
+!coverage.py: This is a private format, don't read it directly!{"arcs":{"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\__init__.py":[[-1,1],[1,2],[2,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\steem.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,23],[23,24],[24,25],[25,27],[27,30],[-30,30],[30,89],[89,96],[96,151],[151,169],[169,178],[178,204],[204,215],[215,226],[226,237],[237,248],[248,259],[259,270],[270,284],[284,295],[295,301],[301,312],[312,332],[332,337],[337,340],[340,352],[352,374],[374,389],[389,394],[394,403],[403,411],[411,415],[415,421],[421,483],[483,501],[501,512],[512,520],[520,530],[530,538],[538,544],[544,549],[549,562],[562,574],[574,575],[575,576],[576,577],[577,578],[578,579],[579,580],[580,581],[581,582],[582,583],[583,584],[584,585],[585,586],[586,587],[587,588],[588,589],[589,813],[813,833],[833,834],[834,-30],[30,-2],[-91,100],[100,102],[102,103],[103,104],[104,105],[105,106],[106,111],[111,112],[112,114],[114,115],[115,116],[116,117],[117,118],[118,119],[119,122],[122,124],[124,125],[125,126],[126,127],[127,128],[-148,155],[155,161],[161,162],[162,164],[164,165],[165,167],[167,-148],[128,131],[-169,170],[170,173],[173,174],[174,-169],[131,133],[133,135],[135,136],[136,137],[137,138],[138,139],[139,143],[-562,563],[563,565],[-549,554],[554,555],[555,556],[556,557],[557,559],[559,560],[560,-549],[565,-562],[143,-91],[-415,418],[155,156],[156,157],[157,161],[-178,186],[186,188],[188,190],[190,193],[193,194],[-204,209],[209,213],[213,-204],[194,195],[-215,220],[220,224],[224,-215],[195,196],[-237,242],[242,246],[246,-237],[196,197],[-248,253],[253,257],[257,-248],[197,198],[-259,264],[264,268],[268,-259],[198,199],[-270,278],[278,282],[282,-270],[199,200],[-374,383],[383,387],[387,-374],[200,201],[-394,397],[397,401],[401,-394],[201,202],[-226,231],[231,235],[235,-226],[202,-178],[418,419],[419,-415],[190,191],[191,192],[192,-178],[-403,405],[405,409],[409,-403],[-332,333],[333,334],[334,335],[-312,315],[315,325],[209,210],[210,211],[211,-204],[325,328],[328,329],[329,-312],[335,-332],[-340,341],[231,232],[232,233],[233,-226],[341,342],[342,343],[343,344],[344,346],[346,347],[-337,338],[338,-337],[347,348],[-284,287],[242,243],[243,244],[244,-237],[287,288],[288,289],[289,290],[290,291],[291,293],[293,-284],[348,349],[349,350],[350,-340],[133,-91],[128,-91]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\__init__.py":[[-1,1],[1,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\version.py":[[-3,3],[3,-3]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\py23.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,8],[8,9],[9,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,26],[26,38],[38,-1],[-26,27],[27,29],[29,32],[32,33],[33,-26],[-38,39],[39,42],[42,-38],[32,35],[35,-26]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemapi\\__init__.py":[[-1,1],[1,3],[3,4],[4,5],[5,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemapi\\version.py":[[-3,3],[3,-3]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemapi\\steemnoderpc.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,20],[-20,20],[20,21],[21,-20],[20,24],[-24,24],[24,28],[28,30],[30,38],[38,47],[47,72],[72,82],[82,-24],[24,-1],[-30,31],[-47,56],[56,58],[58,-47],[-38,39],[39,40],[40,-38],[31,32],[32,33],[33,34],[34,36],[-82,86],[86,87],[87,88],[88,89],[89,90],[90,-82],[36,-30],[39,41],[41,42],[42,43],[43,44],[44,41],[41,-38],[31,-30]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgrapheneapi\\__init__.py":[[-1,1],[1,2],[2,3],[3,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgrapheneapi\\version.py":[[-3,3],[3,-3]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgrapheneapi\\graphenewsrpc.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,19],[-19,19],[19,20],[20,-19],[19,23],[-23,23],[23,24],[24,-23],[23,27],[-27,27],[27,58],[58,59],[59,73],[73,77],[77,107],[107,113],[113,171],[171,-27],[27,-1],[-59,60],[60,61],[61,62],[62,63],[63,66],[66,67],[67,68],[68,70],[-77,78],[78,79],[79,80],[80,81],[81,82],[82,83],[83,84],[84,85],[85,88],[88,89],[89,90],[90,105],[-171,174],[174,202],[202,-171],[-174,177],[177,191],[191,194],[194,196],[196,197],[197,198],[198,199],[-73,74],[74,75],[75,-73],[199,200],[-113,120],[120,121],[121,122],[122,123],[123,125],[125,126],[126,127],[127,128],[128,153],[153,154],[154,155],[155,159],[159,161],[161,167],[167,-113],[200,201],[201,-174],[105,-77],[70,71],[71,-59],[177,178],[178,189],[189,194],[178,179],[179,180],[180,181],[181,194],[89,91],[91,92],[92,-77],[70,-59]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\__init__.py":[[-1,1],[1,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\version.py":[[-3,3],[3,-3]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\chains.py":[[-1,1],[1,2],[2,3],[3,4],[4,7],[7,8],[8,9],[9,10],[10,11],[11,14],[14,15],[15,16],[16,17],[17,18],[18,22],[22,24],[24,26],[26,28],[28,30],[30,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemapi\\exceptions.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,10],[10,28],[-28,28],[28,29],[29,-28],[28,32],[-32,32],[32,33],[33,-32],[32,36],[-36,36],[36,37],[37,-36],[36,40],[-40,40],[40,41],[41,-40],[40,44],[-44,44],[44,45],[45,-44],[44,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\account.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,15],[-15,15],[15,20],[20,22],[22,-15],[15,26],[-26,26],[26,43],[43,45],[45,-26],[26,49],[-49,49],[49,62],[62,63],[63,-49],[49,69],[-69,69],[69,85],[85,86],[86,-69],[69,92],[-92,92],[92,114],[114,115],[115,-92],[92,-1],[-115,116],[116,118],[118,-115]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\account.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,15],[15,16],[16,17],[17,18],[18,20],[20,23],[-23,23],[23,28],[28,30],[30,35],[35,43],[43,46],[46,49],[49,-23],[23,53],[53,54],[-53,53],[53,72],[72,74],[74,81],[81,87],[87,92],[92,96],[96,100],[100,109],[109,112],[112,115],[115,118],[118,-53],[54,135],[135,136],[-135,135],[135,149],[149,150],[150,162],[162,168],[168,174],[174,183],[183,189],[189,201],[201,-135],[136,209],[209,210],[-209,209],[209,226],[226,227],[227,233],[233,245],[245,254],[254,267],[267,272],[272,276],[276,282],[282,286],[286,-209],[210,291],[291,292],[-291,291],[291,314],[314,315],[315,329],[329,340],[340,346],[346,350],[350,356],[356,-291],[292,-1],[-315,316],[316,318],[318,321],[321,323],[-329,331],[331,332],[332,333],[333,334],[334,335],[335,336],[336,337],[337,338],[338,-329],[323,324],[-227,228],[228,229],[229,230],[-150,151],[151,152],[152,153],[153,154],[154,-150],[230,231],[231,-227],[324,325],[325,326],[326,327],[327,-315],[-350,354],[354,-350],[-282,284],[284,-282],[332,-329],[323,-315],[-346,348],[348,-346]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\base58.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,17],[17,20],[20,21],[21,22],[22,23],[23,24],[24,25],[25,26],[26,27],[27,31],[31,32],[-31,31],[31,55],[55,56],[56,69],[69,89],[89,97],[97,105],[105,-31],[32,116],[116,119],[119,140],[140,158],[158,164],[164,168],[168,172],[172,176],[176,183],[183,192],[192,198],[198,-1],[-56,57],[57,58],[-58,58],[58,58],[58,60],[60,61],[-183,184],[-119,120],[120,121],[121,122],[122,123],[123,124],[124,125],[125,128],[128,123],[123,130],[130,131],[131,132],[132,133],[133,134],[134,131],[131,136],[136,137],[137,-119],[184,185],[185,186],[-164,165],[165,-164],[186,187],[187,189],[189,-183],[61,-56],[-89,95],[95,-89],[58,-58],[58,59],[59,-56],[-69,77],[77,78],[-176,177],[177,178],[178,179],[179,180],[-140,141],[141,142],[142,143],[143,144],[144,145],[145,146],[146,144],[144,148],[148,149],[149,150],[150,151],[151,152],[152,149],[149,154],[154,155],[155,-140],[180,-176],[78,-69],[77,79],[79,81],[81,83],[83,84],[-97,103],[-192,193],[-158,159],[159,160],[160,161],[161,-158],[193,194],[194,195],[195,-192],[103,-97],[84,-69]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\dictionary.py":[[-2,2],[2,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\transactions.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,12],[12,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\signedtransactions.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,13],[-13,13],[13,21],[21,22],[22,25],[25,28],[28,31],[31,34],[34,-13],[13,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\signedtransactions.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,12],[12,13],[13,21],[21,22],[22,23],[23,24],[24,25],[25,26],[26,28],[28,29],[29,32],[32,33],[33,34],[34,38],[-38,38],[38,46],[46,47],[47,78],[78,96],[96,99],[99,111],[111,114],[114,127],[127,145],[145,172],[172,-38],[38,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\types.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,22],[22,25],[25,36],[36,50],[50,56],[56,62],[62,63],[-62,62],[62,64],[64,67],[67,70],[70,-62],[63,74],[74,75],[-74,74],[74,76],[76,79],[79,82],[82,-74],[75,86],[86,87],[-86,86],[86,88],[88,91],[91,94],[94,-86],[87,98],[98,99],[-98,98],[98,100],[100,103],[103,106],[106,-98],[99,110],[110,111],[-110,110],[110,112],[112,115],[115,118],[118,-110],[111,122],[122,123],[-122,122],[122,124],[124,127],[127,130],[130,-122],[123,134],[134,135],[-134,134],[134,136],[136,139],[139,142],[142,-134],[135,146],[146,147],[-146,146],[146,148],[148,151],[151,155],[155,158],[158,-146],[147,183],[183,184],[-183,183],[183,185],[185,192],[192,197],[197,-183],[184,201],[201,202],[-201,201],[201,203],[203,206],[206,209],[209,-201],[202,213],[213,214],[-213,213],[213,215],[215,219],[219,222],[222,-213],[214,232],[232,233],[-232,232],[232,234],[234,237],[237,243],[243,-232],[233,247],[247,248],[-247,247],[247,249],[249,252],[252,255],[255,-247],[248,259],[259,260],[-259,259],[259,261],[261,264],[264,-259],[260,268],[-268,268],[268,269],[269,-268],[268,273],[273,274],[-273,273],[273,275],[275,278],[278,281],[281,-273],[274,285],[285,286],[-285,285],[285,287],[287,290],[290,296],[296,299],[299,-285],[286,305],[305,306],[-305,305],[305,307],[307,311],[311,314],[314,-305],[306,318],[318,319],[-318,318],[318,320],[320,323],[323,330],[330,-318],[319,337],[337,338],[-337,337],[337,339],[339,342],[342,345],[345,-337],[338,349],[349,350],[-349,349],[349,351],[351,358],[358,362],[362,-349],[350,366],[366,367],[-366,366],[366,369],[369,370],[370,385],[385,388],[388,-366],[367,392],[392,393],[-392,392],[392,395],[395,396],[396,407],[407,412],[412,-392],[393,416],[416,417],[-416,416],[416,418],[418,428],[428,-416],[417,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\objecttypes.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\objects.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,18],[18,19],[19,20],[20,21],[21,22],[22,25],[25,26],[-25,25],[25,27],[27,48],[48,51],[51,59],[59,64],[64,67],[67,-25],[26,71],[71,72],[-71,71],[71,81],[81,82],[82,85],[85,96],[96,113],[113,116],[116,119],[119,-71],[72,123],[123,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\chains.py":[[-1,1],[1,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\operationids.py":[[-2,2],[2,3],[3,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\operations.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,14],[14,15],[15,16],[16,17],[17,18],[18,21],[-21,21],[21,22],[22,-21],[21,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\ecdsasig.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,18],[18,19],[19,22],[22,23],[23,24],[24,28],[28,36],[36,43],[43,71],[71,89],[89,176],[176,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\operations.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,16],[16,17],[17,18],[18,19],[19,35],[35,38],[38,47],[-47,47],[47,48],[48,-47],[47,74],[-74,74],[74,75],[75,-74],[74,89],[-89,89],[89,90],[90,-89],[89,103],[-103,103],[103,104],[104,-103],[103,116],[-116,116],[116,117],[117,-116],[116,130],[-130,130],[130,131],[131,-130],[130,142],[-142,142],[142,144],[144,-142],[142,175],[-175,175],[175,177],[177,-175],[175,210],[-210,210],[210,211],[211,-210],[210,252],[-252,252],[252,253],[253,-252],[252,276],[-276,276],[276,277],[277,-276],[276,302],[-302,302],[302,303],[303,-302],[302,331],[-331,331],[331,332],[332,-331],[331,362],[-362,362],[362,363],[363,-362],[362,376],[-376,376],[376,377],[377,-376],[376,390],[-390,390],[390,391],[391,-390],[390,405],[-405,405],[405,406],[406,-405],[405,421],[-421,421],[421,422],[422,-421],[421,435],[-435,435],[435,436],[436,-435],[435,450],[-450,450],[450,451],[451,-450],[450,468],[-468,468],[468,469],[469,-468],[468,488],[-488,488],[488,489],[489,-488],[488,502],[-502,502],[502,503],[503,-502],[502,518],[-518,518],[518,519],[519,-518],[518,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\objects.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,19],[19,20],[20,21],[21,22],[22,23],[23,24],[24,25],[25,28],[28,29],[29,30],[30,34],[34,38],[38,42],[-42,42],[42,44],[44,45],[45,-42],[42,61],[61,62],[-61,61],[61,63],[63,77],[77,84],[84,-61],[62,88],[88,89],[-88,88],[88,90],[90,93],[93,98],[98,101],[101,109],[109,113],[113,116],[116,-88],[89,120],[-120,120],[120,121],[121,-120],[120,141],[-141,141],[141,142],[142,-141],[141,155],[-155,155],[155,156],[156,-155],[155,168],[-168,168],[168,169],[169,-168],[168,205],[-205,205],[205,206],[206,-205],[205,231],[231,232],[-231,231],[231,233],[233,-231],[232,240],[-240,240],[240,241],[241,-240],[240,255],[-255,255],[255,256],[256,-255],[255,269],[-269,269],[269,270],[270,-269],[269,284],[-284,284],[284,295],[295,296],[296,-284],[284,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\objecttypes.py":[[-1,1],[1,2],[2,3],[3,4],[4,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,21],[21,22],[22,23],[23,24],[24,25],[25,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\operationids.py":[[-1,1],[1,2],[2,3],[3,4],[4,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,21],[21,22],[22,23],[23,24],[24,25],[25,26],[26,27],[27,28],[28,29],[29,30],[30,31],[31,32],[32,33],[33,34],[34,35],[35,36],[36,37],[37,38],[38,39],[39,40],[40,41],[41,42],[42,43],[43,44],[44,45],[45,46],[46,47],[47,48],[48,49],[49,50],[50,51],[51,52],[52,53],[53,54],[54,55],[55,56],[56,57],[57,58],[58,59],[59,60],[60,61],[61,62],[62,64],[-64,64],[64,64],[64,-64],[64,67],[67,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\transactions.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,12],[12,13],[13,14],[14,15],[15,17],[17,20],[20,31],[31,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\account.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,21],[21,24],[-24,24],[24,53],[53,55],[55,62],[62,73],[73,93],[93,98],[98,104],[104,110],[110,116],[116,120],[120,124],[124,144],[144,156],[156,172],[172,181],[181,194],[194,204],[204,213],[213,219],[219,233],[233,247],[247,261],[261,267],[267,274],[274,286],[286,298],[298,311],[311,323],[323,332],[332,341],[341,351],[351,361],[361,385],[385,404],[404,410],[410,415],[415,446],[446,452],[452,458],[458,464],[464,470],[470,476],[476,477],[477,537],[537,549],[549,572],[572,596],[596,623],[623,633],[633,663],[663,701],[701,734],[734,769],[769,807],[807,846],[846,869],[869,932],[932,964],[964,995],[995,1072],[1072,-24],[24,-2],[-57,64],[64,65],[65,66],[66,67],[67,68],[68,69],[69,70],[-73,76],[76,77],[77,78],[78,82],[82,85],[85,86],[86,88],[88,89],[89,91],[91,-73],[70,-57],[82,83],[83,-73],[-98,102],[102,-98],[-361,365],[365,366],[366,367],[-311,316],[316,317],[317,319],[319,320],[-319,319],[319,319],[319,-319],[320,-311],[367,376],[376,377],[377,380],[380,381],[381,380],[381,382],[382,-361],[-124,127],[127,130],[-110,114],[-144,147],[147,148],[148,149],[149,-144],[114,-110],[130,131],[-156,159],[159,160],[160,161],[161,162],[162,165],[165,166],[166,167],[167,-156],[-194,197],[-204,207],[207,208],[208,210],[210,211],[211,-204],[197,198],[198,199],[199,200],[200,201],[201,202],[202,-194],[131,132],[-181,184],[184,185],[185,186],[186,187],[-172,175],[175,178],[178,179],[179,-172],[187,191],[191,192],[192,-181],[132,133],[133,134],[-351,355],[355,356],[-323,325],[325,326],[326,328],[328,329],[-328,328],[328,328],[328,-328],[329,-323],[356,357],[-332,334],[334,335],[335,337],[337,338],[-337,337],[337,337],[337,-337],[338,-332],[357,358],[-341,344],[365,376],[344,345],[345,346],[346,347],[347,348],[348,-341],[358,-351],[134,135],[-415,417],[417,418],[418,419],[419,422],[422,423],[423,424],[424,425],[425,426],[426,427],[427,428],[428,430],[430,431],[431,432],[432,433],[433,434],[434,435],[435,436],[436,437],[437,439],[439,441],[441,442],[442,-415],[135,136],[136,137],[137,138],[138,139],[139,140],[140,142],[142,-124],[-475,490],[490,491],[491,493],[493,494],[494,495],[495,496],[496,498],[498,500],[500,501],[501,502],[502,-475],[-274,277],[277,279],[-298,301],[301,302],[302,303],[303,306],[306,309],[309,-298],[-279,279],[279,279],[279,-279],[279,-274],[-286,289],[289,291],[302,304],[304,305],[305,306],[-291,291],[291,-291],[291,-286],[-267,269],[269,270],[270,271],[271,272],[272,-267]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\instance.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,10],[-10,10],[10,11],[11,-10],[10,14],[14,35],[35,45],[45,-2],[-14,29],[29,30],[-45,48],[48,49],[49,-45],[30,31],[31,32],[32,-14],[29,32],[-35,41],[41,42],[42,-35]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\exceptions.py":[[-2,2],[2,3],[3,4],[4,5],[5,8],[-8,8],[8,11],[11,12],[12,-8],[8,15],[-15,15],[15,17],[17,18],[18,-15],[15,21],[-21,21],[21,23],[23,24],[24,-21],[21,27],[-27,27],[27,29],[29,30],[30,-27],[27,33],[-33,33],[33,35],[35,36],[36,-33],[33,39],[-39,39],[39,41],[41,42],[42,-39],[39,45],[-45,45],[45,47],[47,48],[48,-45],[45,51],[-51,51],[51,53],[53,54],[54,-51],[51,57],[-57,57],[57,59],[59,60],[60,-57],[57,63],[-63,63],[63,65],[65,66],[66,-63],[63,69],[-69,69],[69,71],[71,72],[72,-69],[69,75],[-75,75],[75,77],[77,78],[78,-75],[75,81],[-81,81],[81,84],[84,85],[85,-81],[81,88],[-88,88],[88,90],[90,91],[91,-88],[88,94],[-94,94],[94,96],[96,97],[97,-94],[94,100],[-100,100],[100,102],[102,103],[103,-100],[100,106],[-106,106],[106,108],[108,109],[109,-106],[106,112],[-112,112],[112,114],[114,115],[115,-112],[112,118],[-118,118],[118,120],[120,121],[121,-118],[118,124],[-124,124],[124,126],[126,127],[127,-124],[124,130],[-130,130],[130,132],[132,133],[133,-130],[130,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\blockchainobject.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,14],[14,15],[-14,14],[14,17],[17,21],[21,26],[26,36],[36,41],[41,47],[47,54],[54,-14],[15,59],[-59,59],[59,61],[61,62],[62,63],[63,65],[-17,18],[18,19],[19,-17],[65,76],[76,128],[128,133],[133,141],[141,148],[148,153],[153,156],[156,159],[159,164],[164,169],[169,174],[174,178],[178,-59],[59,-2],[-67,80],[-128,130],[130,-128],[80,81],[81,82],[82,85],[85,89],[89,90],[90,93],[93,96],[96,99],[99,108],[108,109],[109,110],[110,111],[96,97],[97,98],[98,124],[124,125],[-148,150],[150,151],[-26,27],[-47,48],[48,52],[52,-47],[27,30],[30,31],[31,32],[32,34],[34,-26],[151,-148],[125,126],[126,-67],[111,112],[112,113],[113,124],[48,49],[49,50],[50,51],[51,-47],[27,28],[28,30],[130,131],[-21,24],[24,-21],[131,-128],[111,-67],[-159,160],[160,162],[162,-159],[89,92],[92,93],[-164,165],[165,166],[166,167],[167,-164],[-169,170],[170,171],[171,172],[172,-169],[-174,175],[175,176],[176,-174]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\utils.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,14],[14,17],[17,26],[26,35],[35,48],[48,56],[56,65],[65,74],[74,93],[93,105],[105,128],[128,139],[139,152],[152,182],[182,208],[208,219],[219,230],[230,-2],[-26,29],[29,31],[31,32],[32,-26]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\amount.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,13],[13,14],[-13,13],[13,57],[57,58],[58,115],[115,123],[123,129],[129,135],[135,138],[138,146],[146,152],[152,159],[159,162],[162,165],[165,175],[175,185],[185,195],[195,206],[206,217],[217,227],[227,237],[237,246],[246,255],[255,264],[264,273],[273,280],[280,289],[289,293],[293,301],[301,309],[309,317],[317,325],[325,333],[333,341],[341,342],[342,343],[343,-13],[14,-2],[-58,59],[59,61],[61,62],[62,68],[68,69],[69,70],[70,113],[113,-58],[-175,176],[-115,118],[118,119],[119,120],[120,121],[68,72],[72,80],[80,88],[88,93],[93,97],[97,101],[101,102],[102,103],[103,104],[104,113],[121,-115],[176,177],[177,178],[178,180],[180,183],[183,-175],[-165,166],[166,167],[167,168],[168,170],[170,173],[173,-165],[-123,127],[127,-123],[-185,186],[186,187],[187,192],[192,193],[193,-185],[-159,160],[160,-159]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\asset.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,11],[-11,11],[11,25],[25,26],[26,33],[33,44],[44,66],[66,70],[70,-11],[11,-2],[-28,35],[35,36],[36,37],[37,38],[38,39],[39,40],[-44,47],[47,48],[48,53],[53,54],[54,55],[55,56],[56,57],[57,-44],[40,42],[42,-28],[48,49],[49,50],[50,51],[51,52],[52,-44],[53,58],[58,59],[59,60],[60,61],[61,62],[62,-44]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\price.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,19],[19,20],[-19,19],[19,72],[72,79],[79,150],[150,159],[159,165],[165,171],[171,174],[174,186],[186,198],[198,206],[206,212],[212,223],[223,226],[226,270],[270,279],[279,309],[309,318],[318,321],[321,324],[324,334],[334,344],[344,354],[354,364],[364,374],[374,384],[384,385],[385,386],[386,388],[388,-19],[20,403],[-403,403],[403,416],[416,417],[417,442],[442,457],[457,-403],[403,460],[-460,460],[460,470],[470,472],[472,503],[503,515],[515,-460],[460,518],[-518,518],[518,524],[524,525],[525,539],[539,547],[547,-518],[518,550],[-550,550],[550,563],[563,564],[564,-550],[550,-2],[-73,82],[82,83],[83,85],[85,95],[95,109],[109,114],[114,121],[121,124],[124,129],[129,133],[133,134],[-150,151],[151,152],[152,153],[153,-150],[134,135],[153,154],[154,155],[155,156],[156,157],[-165,166],[166,167],[167,-165],[157,-150],[135,-73],[-174,179],[179,180],[-159,160],[160,161],[161,162],[162,163],[163,-159],[180,-174],[-226,227],[227,228],[228,260],[260,261],[261,263],[263,264],[264,265],[265,268],[268,-226]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\storage.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,21],[21,22],[22,23],[23,25],[25,28],[-28,28],[28,47],[47,48],[48,49],[49,50],[50,52],[52,53],[53,55],[55,59],[59,73],[73,93],[93,104],[104,-28],[28,112],[-112,112],[112,116],[116,117],[117,119],[119,122],[122,133],[133,146],[146,156],[156,176],[176,190],[190,207],[207,-112],[112,221],[-221,221],[221,224],[224,225],[225,228],[228,229],[229,230],[230,232],[232,233],[233,234],[234,235],[235,238],[238,241],[241,252],[252,265],[265,283],[283,295],[295,315],[315,323],[323,329],[329,343],[343,354],[354,357],[357,367],[367,-221],[221,375],[-375,375],[375,379],[379,381],[381,382],[382,385],[385,387],[387,408],[408,421],[421,427],[427,436],[436,442],[442,451],[451,457],[457,-375],[375,464],[-119,120],[-55,57],[-59,63],[63,64],[64,-59],[57,-55],[120,-119],[464,465],[-238,239],[239,-238],[465,468],[-241,244],[244,245],[245,246],[246,247],[247,248],[248,249],[249,250],[250,-241],[468,471],[471,472],[-122,125],[125,126],[126,127],[127,128],[128,129],[129,130],[130,131],[131,-122],[472,-2],[-323,324],[-283,286],[286,287],[287,288],[288,290],[290,291],[291,292],[292,293],[293,-283],[324,325],[325,-323],[-295,299],[299,300],[300,301],[301,303],[303,304],[304,305],[305,306],[306,307],[307,310],[310,311],[311,-295],[-329,330],[330,331],[331,332],[332,333],[333,338],[338,339],[339,340],[340,341],[341,-329]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\aes.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,21],[-21,21],[21,25],[25,26],[26,30],[30,37],[37,40],[40,44],[44,50],[50,-21],[21,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\wallet.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,22],[22,24],[24,27],[-27,27],[27,95],[95,96],[96,97],[97,98],[98,101],[101,102],[102,103],[103,106],[106,107],[107,109],[109,139],[139,158],[158,172],[172,179],[179,184],[184,189],[189,200],[200,207],[207,219],[219,224],[224,229],[229,238],[238,248],[248,256],[256,269],[269,288],[288,314],[314,323],[323,331],[331,348],[348,365],[365,382],[382,399],[399,405],[405,417],[417,433],[433,447],[447,464],[464,475],[475,486],[486,-27],[27,-1],[-109,110],[110,111],[111,114],[114,115],[115,118],[118,119],[119,125],[125,126],[126,128],[128,129],[-139,143],[143,144],[144,145],[145,146],[146,147],[147,151],[151,152],[152,153],[153,156],[156,151],[151,-139],[129,-109],[125,128],[128,134],[134,136],[136,137],[137,-109],[153,154],[154,155],[155,-139]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgraphenebase\\bip38.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,15],[15,16],[16,23],[23,24],[24,25],[25,26],[26,27],[27,37],[37,40],[-40,40],[40,41],[41,-40],[40,44],[44,50],[50,87],[87,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\transactionbuilder.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,20],[20,21],[21,22],[22,25],[25,26],[-25,25],[25,46],[46,49],[49,50],[50,51],[51,52],[52,65],[65,68],[68,71],[71,74],[74,77],[77,80],[80,83],[83,86],[86,89],[89,92],[92,95],[95,100],[100,105],[105,112],[112,123],[123,186],[186,196],[196,221],[221,256],[256,265],[265,299],[299,309],[309,349],[349,-25],[26,-2],[-47,54],[54,55],[-299,302],[302,303],[303,304],[304,306],[306,307],[307,-299],[55,56],[56,62],[62,63],[-65,66],[66,-65],[63,-47]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\version.py":[[-3,3],[3,-3]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\witness.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,20],[-20,20],[20,32],[32,33],[33,40],[40,51],[51,60],[60,67],[67,111],[111,-20],[20,148],[-148,148],[148,149],[149,-148],[148,178],[-178,178],[178,183],[183,184],[184,-178],[178,198],[-198,198],[198,204],[204,205],[205,-198],[198,220],[-220,220],[220,226],[226,227],[227,-220],[220,257],[-257,257],[257,263],[263,264],[264,-257],[257,277],[-277,277],[277,283],[283,284],[284,-277],[277,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\block.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,11],[-11,11],[11,33],[33,34],[34,43],[43,48],[48,52],[52,61],[61,-11],[11,76],[-76,76],[76,77],[77,89],[89,-76],[76,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\blockchain.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,20],[20,21],[-20,20],[20,52],[52,57],[57,68],[68,76],[76,87],[87,110],[110,121],[121,132],[132,172],[172,198],[198,228],[228,253],[253,281],[281,-20],[21,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\cli.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,20],[20,21],[21,22],[22,23],[23,24],[24,28],[28,29],[29,30],[30,34],[34,35],[35,36],[36,37],[37,38],[38,39],[39,40],[40,41],[41,42],[42,43],[43,44],[44,45],[45,46],[46,47],[47,48],[48,49],[49,50],[50,51],[51,52],[52,53],[53,54],[54,69],[69,70],[70,71],[71,72],[72,73],[73,88],[88,104],[104,105],[105,106],[106,107],[107,108],[108,109],[109,120],[120,134],[134,135],[135,136],[136,137],[137,153],[153,173],[173,188],[188,189],[189,190],[190,198],[198,199],[199,200],[200,240],[240,241],[241,242],[242,253],[253,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\comment.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,22],[-22,22],[22,28],[28,29],[29,36],[36,88],[88,128],[128,162],[162,166],[166,170],[170,174],[174,178],[178,182],[182,186],[186,190],[190,194],[194,198],[198,202],[202,207],[207,212],[212,221],[221,225],[225,235],[235,245],[245,285],[285,324],[324,341],[341,376],[376,561],[561,585],[585,-22],[22,630],[-630,630],[630,635],[635,636],[636,-630],[630,649],[-649,649],[649,654],[654,655],[655,-649],[649,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\market.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,19],[-19,19],[19,48],[48,52],[52,60],[60,67],[67,130],[130,152],[152,189],[189,230],[230,260],[260,264],[264,279],[279,316],[316,411],[411,484],[484,-19],[19,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\message.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,18],[18,24],[24,31],[31,44],[44,47],[-47,47],[47,49],[49,53],[53,94],[94,-47],[47,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\memo.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,16],[-16,16],[16,142],[142,147],[147,157],[157,163],[163,215],[215,-16],[16,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\memo.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,19],[19,20],[20,21],[21,22],[22,25],[25,47],[47,70],[70,91],[91,96],[96,103],[103,129],[129,155],[155,187],[187,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\vote.py":[[-2,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[13,14],[14,15],[15,16],[16,17],[17,18],[18,19],[19,22],[-22,22],[22,33],[33,34],[34,42],[42,80],[80,98],[98,106],[106,110],[110,114],[114,118],[118,122],[122,126],[126,130],[130,141],[141,-22],[22,146],[-146,146],[146,147],[147,-146],[146,174],[-174,174],[174,179],[179,180],[180,-174],[174,209],[-209,209],[209,215],[215,216],[216,-209],[209,-2]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beembase\\bip38.py":[[-1,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,12],[12,25],[25,-1]],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\discussions.py":[],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beem\\notify.py":[],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemapi\\websocket.py":[],"C:\\Users\\nahrstaedt\\Documents\\git\\beem\\beemgrapheneapi\\grapheneapi.py":[]}}
\ No newline at end of file
diff --git a/.coveragerc b/.coveragerc
index 9ed2314f..24756d20 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,11 +1,11 @@
 [run]
 branch = True
 source =
-    beem
-    beembase
-    beemapi
-    beemgrapheneapi
-    beemgraphenebase
+    beem/
+    beembase/
+    beemapi/
+    beemgrapheneapi/
+    beemgraphenebase/
 omit = 
      */.eggs/*
      */.tox/*
@@ -17,10 +17,10 @@ omit =
 
 [paths]
 source =
-    beem
-    beembase
-    beemapi
-    beemgrapheneapi
-    beemgraphenebase
+    beem/
+    beembase/
+    beemapi/
+    beemgrapheneapi/
+    beemgraphenebase/
     .tox/*/lib/python*/site-packages/beem
     .tox/pypy/site-packages/beem
diff --git a/beem/transactionbuilder.py b/beem/transactionbuilder.py
index 6fa6f7e7..0e51eb75 100644
--- a/beem/transactionbuilder.py
+++ b/beem/transactionbuilder.py
@@ -124,7 +124,8 @@ class TransactionBuilder(dict):
         """ Try to obtain the wif key from the wallet by telling which account
             and permission is supposed to sign the transaction
         """
-        assert permission in ["active", "owner", "posting"], "Invalid permission"
+        if permission not in ["active", "owner", "posting"]:
+            raise AssertionError("Invalid permission")
         account = Account(account, steem_instance=self.steem)
         if permission not in account:
             account = Account(account, steem_instance=self.steem, lazy=False, full=True)
@@ -132,7 +133,8 @@ class TransactionBuilder(dict):
             account.refresh()
         if permission not in account:
             account = Account(account, steem_instance=self.steem)
-        assert permission in account, "Could not access permission"
+        if permission not in account:
+            raise AssertionError("Could not access permission")
 
         required_treshold = account[permission]["weight_threshold"]
 
diff --git a/beembase/memo.py b/beembase/memo.py
index ddd98b1e..0c458091 100644
--- a/beembase/memo.py
+++ b/beembase/memo.py
@@ -216,7 +216,8 @@ def decode_memo(priv, message):
     aes, checksum = init_aes(shared_secret, nonce)
 
     # Check
-    assert check == checksum, "Checksum failure"
+    if not check == checksum:
+        raise AssertionError("Checksum failure")
 
     # Encryption
     # remove the varint prefix (FIXME, long messages!)
diff --git a/beemgraphenebase/account.py b/beemgraphenebase/account.py
index 9839b10e..edb3d219 100644
--- a/beemgraphenebase/account.py
+++ b/beemgraphenebase/account.py
@@ -122,7 +122,8 @@ class BrainKey(object):
         word_count = 16
         brainkey = [None] * word_count
         dict_lines = BrainKeyDictionary.split(',')
-        assert len(dict_lines) == 49744
+        if not len(dict_lines) == 49744:
+            raise AssertionError()
         for j in range(0, word_count):
             num = int.from_bytes(os.urandom(2), byteorder="little")
             rndMult = num / 2 ** 16  # returns float between 0..1 (inclusive)
@@ -256,7 +257,8 @@ class PublicKey(Address):
         prefix = public_key[0:2]
         if prefix == "04":
             return public_key
-        assert prefix == "02" or prefix == "03"
+        if not (prefix == "02" or prefix == "03"):
+            raise AssertionError()
         x = int(public_key[2:], 16)
         y = self._derive_y_from_x(x, (prefix == "02"))
         key = '04' + '%064x' % x + '%064x' % y
diff --git a/beemgraphenebase/base58.py b/beemgraphenebase/base58.py
index 4a10dd6e..bb947d2e 100644
--- a/beemgraphenebase/base58.py
+++ b/beemgraphenebase/base58.py
@@ -184,7 +184,8 @@ def base58CheckDecode(s):
     s = unhexlify(base58decode(s))
     dec = hexlify(s[:-4]).decode('ascii')
     checksum = doublesha256(dec)[:4]
-    assert(s[-4:] == checksum)
+    if not (s[-4:] == checksum):
+        raise AssertionError()
     return dec[2:]
 
 
@@ -198,5 +199,6 @@ def gphBase58CheckDecode(s):
     s = unhexlify(base58decode(s))
     dec = hexlify(s[:-4]).decode('ascii')
     checksum = ripemd160(dec)[:4]
-    assert(s[-4:] == checksum)
+    if not (s[-4:] == checksum):
+        raise AssertionError()
     return dec
diff --git a/beemgraphenebase/ecdsasig.py b/beemgraphenebase/ecdsasig.py
index 8a1c9f80..43eb952a 100644
--- a/beemgraphenebase/ecdsasig.py
+++ b/beemgraphenebase/ecdsasig.py
@@ -113,7 +113,8 @@ def sign_message(message, wif, hashfn=hashlib.sha256):
                 secp256k1.ffi.NULL,
                 ndata
             )
-            assert signed == 1
+            if not signed == 1:
+                raise AssertionError()
             signature, i = privkey.ecdsa_recoverable_serialize(sig)
             if _is_canonical(signature):
                 i += 4   # compressed
@@ -177,8 +178,10 @@ def verify_message(message, signature, hashfn=hashlib.sha256):
         message = py23_bytes(message, "utf-8")
     if not isinstance(signature, bytes_types):
         signature = py23_bytes(signature, "utf-8")
-    assert isinstance(message, bytes_types)
-    assert isinstance(signature, bytes_types)
+    if not isinstance(message, bytes_types):
+        raise AssertionError()
+    if not isinstance(signature, bytes_types):
+        raise AssertionError()
     digest = hashfn(message).digest()
     sig = signature[1:]
     recoverParameter = bytearray(signature)[0] - 4 - 27  # recover parameter only
diff --git a/beemgraphenebase/signedtransactions.py b/beemgraphenebase/signedtransactions.py
index 16e919a9..1a5bec3e 100644
--- a/beemgraphenebase/signedtransactions.py
+++ b/beemgraphenebase/signedtransactions.py
@@ -102,7 +102,8 @@ class Signed_Transaction(GrapheneObject):
         s, junk = ecdsa.der.remove_sequence(unhexlify(s))
         if junk:
             log.debug('JUNK: %s', hexlify(junk).decode('ascii'))
-        assert(junk == b'')
+        if not (junk == b''):
+            raise AssertionError()
         x, s = ecdsa.der.remove_integer(s)
         y, s = ecdsa.der.remove_integer(s)
         return '%064x%064x' % (x, y)
diff --git a/beemgraphenebase/types.py b/beemgraphenebase/types.py
index 5b5e6d6e..5e81dfd3 100644
--- a/beemgraphenebase/types.py
+++ b/beemgraphenebase/types.py
@@ -6,6 +6,7 @@ from __future__ import unicode_literals
 from builtins import str
 from builtins import bytes
 from builtins import object
+from builtins import int
 from future.utils import python_2_unicode_compatible
 import json
 import struct
@@ -349,7 +350,8 @@ class Id(object):
 class VoteId(object):
     def __init__(self, vote):
         parts = vote.split(":")
-        assert len(parts) == 2
+        if not len(parts) == 2:
+            raise AssertionError()
         self.type = int(parts[0])
         self.instance = int(parts[1])
 
@@ -373,10 +375,10 @@ class ObjectId(object):
             self.instance = Id(int(id))
             self.Id = object_str
             if type_verify:
-                assert object_type[type_verify] == int(type),\
-                    "Object id does not match object type! " +\
-                    "Excpected %d, got %d" %\
-                    (object_type[type_verify], int(type))
+                if not object_type[type_verify] == int(type):
+                    raise AssertionError("Object id does not match object type! " +\
+                        "Excpected %d, got %d" %\
+                        (object_type[type_verify], int(type)))
         else:
             raise Exception("Object id is invalid")
 
@@ -414,10 +416,10 @@ class FullObjectId(object):
 @python_2_unicode_compatible
 class Enum8(Uint8):
     def __init__(self, selection):
-        assert selection in self.options or \
-            isinstance(selection, int) and len(self.options) < selection, \
-            "Options are %s. Given '%s'" % (
-                self.options, selection)
+        if selection not in self.options and \
+            not (isinstance(selection, int) and len(self.options) < selection):
+            raise AssertionError("Options are %s. Given '%s'" % (
+                self.options, selection))
         if selection in self.options:
             super(Enum8, self).__init__(self.options.index(selection))
         else:
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 81d5c8bd..83dc3d1e 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,5 +1,17 @@
-graphenelib
-bitshares
 autobahn>=0.14
-pycryptodome==3.4.6
-appdirs==1.4.0
\ No newline at end of file
+future
+ecdsa
+requests
+websocket-client
+pytz
+pycryptodomex>=3.4.6
+scrypt>=0.7.1
+Events>=0.2.2
+pyyaml
+pytest
+pytest-mock
+coverage
+mock
+appdirs
+Click
+prettytable
diff --git a/setup.py b/setup.py
index b0a35b07..894b7cfb 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,6 @@
 import os
 import sys
 import io
-import subprocess
 from setuptools import setup
 
 # Work around mbcs bug in distutils.
@@ -19,7 +18,7 @@ VERSION = '0.19.11'
 
 tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock']
 
-requires = [            
+requires = [
     "future",
     "ecdsa",
     "requests",
@@ -52,7 +51,6 @@ def get_long_description():
     return '\n\n'.join(descr)
 
 
-
 if __name__ == '__main__':
 
     # Rewrite the version file everytime
diff --git a/tests/beemgraphene/test_account.py b/tests/beemgraphene/test_account.py
index 74dcd2ab..24b205cc 100644
--- a/tests/beemgraphene/test_account.py
+++ b/tests/beemgraphene/test_account.py
@@ -3,6 +3,7 @@ from __future__ import absolute_import
 from __future__ import division
 from __future__ import print_function
 from __future__ import unicode_literals
+from builtins import str
 import unittest
 from beemgraphenebase.base58 import Base58
 from beemgraphenebase.account import BrainKey, Address, PublicKey, PrivateKey, PasswordKey
diff --git a/tests/test_account.py b/tests/test_account.py
index 7f98f900..76568f53 100644
--- a/tests/test_account.py
+++ b/tests/test_account.py
@@ -12,7 +12,6 @@ from beem.account import Account
 from beem.amount import Amount
 from beem.asset import Asset
 from beem.instance import set_shared_steem_instance
-from beembase.operationids import getOperationNameForId
 
 wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
 nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io",
diff --git a/tests/test_block.py b/tests/test_block.py
new file mode 100644
index 00000000..038c7b59
--- /dev/null
+++ b/tests/test_block.py
@@ -0,0 +1,49 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+from builtins import super
+import unittest
+from pprint import pprint
+from beem import Steem
+from beem.block import Block
+from datetime import datetime
+from beem.instance import set_shared_steem_instance
+
+wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
+nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io",
+         "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com",
+         "wss://steemd.minnowsupportproject.org"]
+
+
+class Testcases(unittest.TestCase):
+
+    def __init__(self, *args, **kwargs):
+        super().__init__(*args, **kwargs)
+
+        self.bts = Steem(
+            node=nodes,
+            nobroadcast=True,
+            keys={"active": wif},
+        )
+        # from getpass import getpass
+        # self.bts.wallet.unlock(getpass())
+        set_shared_steem_instance(self.bts)
+        self.bts.set_default_account("test")
+
+    def test_block(self):
+        bts = self.bts
+        block = Block(1, steem_instance=bts)
+        self.assertEqual(block.identifier, 1)
+        self.assertTrue(isinstance(block.time(), datetime))
+
+        block2 = Block(2, steem_instance=bts)
+        self.assertTrue(block2.time() > block.time())
+        block2.change_block_number(3)
+        self.assertEqual(block2.identifier, 3)
+
+    def test_block_ops(self):
+        bts = self.bts
+        block = Block(20000000, steem_instance=bts)
+        self.assertTrue(len(block.ops))
+        self.assertTrue(isinstance(block.ops_statistics(), dict))
diff --git a/tests/test_blockchain.py b/tests/test_blockchain.py
new file mode 100644
index 00000000..816b6796
--- /dev/null
+++ b/tests/test_blockchain.py
@@ -0,0 +1,42 @@
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+from builtins import super
+import unittest
+from pprint import pprint
+from beem import Steem
+from beem.blockchain import Blockchain
+from beem.block import Block
+from datetime import datetime
+from beem.instance import set_shared_steem_instance
+
+wif = "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
+nodes = ["wss://steemd.pevo.science", "wss://gtg.steem.house:8090", "wss://rpc.steemliberator.com", "wss://rpc.buildteam.io",
+         "wss://rpc.steemviz.com", "wss://seed.bitcoiner.me", "wss://node.steem.ws", "wss://steemd.steemgigs.org", "wss://steemd.steemit.com",
+         "wss://steemd.minnowsupportproject.org"]
+
+
+class Testcases(unittest.TestCase):
+
+    def __init__(self, *args, **kwargs):
+        super().__init__(*args, **kwargs)
+
+        self.bts = Steem(
+            node=nodes,
+            nobroadcast=True,
+            keys={"active": wif},
+        )
+        # from getpass import getpass
+        # self.bts.wallet.unlock(getpass())
+        set_shared_steem_instance(self.bts)
+        self.bts.set_default_account("test")
+
+    def test_blockchain(self):
+        bts = self.bts
+        b = Blockchain(steem_instance=bts)
+        num = b.get_current_block_num()
+        self.assertTrue(num > 0)
+        block = b.get_current_block()
+        self.assertTrue(isinstance(block, Block))
+        self.assertEqual(num, block.identifier)
diff --git a/tox.ini b/tox.ini
index aaf89b68..5d7a2d64 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,11 +3,14 @@ envlist = py{27,34,35,36,37},lint,pyflakes
 skip_missing_interpreters = true
 
 [testenv]
-deps=-rrequirements-test.txt
-commands=
-    coverage run -a setup.py test
-    coverage report --show-missing --ignore-errors
-    coverage html -i
+deps =
+    mock>=2.0.0
+    pytest
+    coverage
+commands =
+    coverage run --parallel-mode -m pytest {posargs}
+    coverage combine
+    coverage report -m
     coverage xml
 
 [testenv:flake8]
@@ -82,12 +85,6 @@ deps=-rdocs/requirements.txt
 commands=
     sphinx-build -b html ./ ./html
 
-[testenv:coverage]
-deps=-rrequirements-test.txt
-commands =
-    {envpython} -m coverage run -a setup.py test
-    {envpython} -m coverage xml
-
 [testenv:upload_coverage]
 deps = coverage
 passenv = CODACY_PROJECT_TOKEN
-- 
GitLab