analyseether / ether_sql

A python library to push ethereum blockchain data into an sql database.
http://ether-sql.readthedocs.io
Apache License 2.0
69 stars 22 forks source link

Making the tests suite DRY #28

Closed ankitchiplunkar closed 6 years ago

ankitchiplunkar commented 6 years ago

Types of changes

What types of changes does your code introduce to ether_sql? Put an x in the boxes that apply

Explain your changes

We perform similar tests on both infura and parity nodes, but unfortunately the test code was being copied across both the directories. This removes duplication between the two directories.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Where has this been tested?

Operating System: Ubuntu 16.04

Node: Infura and Parity

ankitchiplunkar commented 6 years ago

All tests passing coverage 88%

----------------------------------------------- coverage: platform linux, python 3.6.5-final-0 ------------------------------------------------
Name                                                         Stmts   Miss  Cover
--------------------------------------------------------------------------------
ether_sql/__init__.py                                            0      0   100%
ether_sql/cli/__init__.py                                       46      8    83%
ether_sql/cli/ether.py                                           9      0   100%
ether_sql/cli/sql.py                                            36      4    89%
ether_sql/constants.py                                           3      0   100%
ether_sql/migrations/env.py                                     25      5    80%
ether_sql/migrations/versions/10f48d555d4a_first_change.py      32      0   100%
ether_sql/models/__init__.py                                     8      0   100%
ether_sql/models/blocks.py                                      29      1    97%
ether_sql/models/logs.py                                        45     14    69%
ether_sql/models/receipts.py                                    24      2    92%
ether_sql/models/traces.py                                      59     18    69%
ether_sql/models/transactions.py                                29      1    97%
ether_sql/models/uncles.py                                      28      1    96%
ether_sql/scrapper.py                                           43      0   100%
ether_sql/session.py                                            67     10    85%
ether_sql/settings.py                                           29      0   100%
ether_sql/utils.py                                              17      0   100%
--------------------------------------------------------------------------------
TOTAL                                                          529     64    88%