Updating tests : cryptocurrency/onchain/ethplorer (#1414)

This commit is contained in:
Chavithra
2022-02-22 15:22:41 +01:00
committed by GitHub
parent 8c60ae999b
commit d036af66e4
21 changed files with 35 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getAddressHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=100
uri: https://api.ethplorer.io/getAddressHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=100
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getAddressInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getAddressInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=1000
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=1000
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=1000
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=1000
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTopTokenHolders/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=100
uri: https://api.ethplorer.io/getTopTokenHolders/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=100
response:
body:
string: !!binary |
@@ -105,7 +105,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTopTokens?apiKey=freekey
uri: https://api.ethplorer.io/getTopTokens?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTxInfo/0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6?apiKey=freekey
uri: https://api.ethplorer.io/getTxInfo/0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getAddressHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=100
uri: https://api.ethplorer.io/getAddressHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=100
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getAddressInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getAddressInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenPriceHistoryGrouped/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=1000
uri: https://api.ethplorer.io/getTokenHistory/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=1000
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTopTokenHolders/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey&limit=100
uri: https://api.ethplorer.io/getTopTokenHolders/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY&limit=100
response:
body:
string: !!binary |
@@ -105,7 +105,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=freekey
uri: https://api.ethplorer.io/getTokenInfo/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTopTokens?apiKey=freekey
uri: https://api.ethplorer.io/getTopTokens?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -11,7 +11,7 @@ interactions:
User-Agent:
- python-requests/2.27.1
method: GET
uri: https://api.ethplorer.io/getTxInfo/0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6?apiKey=freekey
uri: https://api.ethplorer.io/getTxInfo/0x9dc7b43ad4288c624fdd236b2ecb9f2b81c93e706b2ffd1d19b112c1df7849e6?apiKey=MOCK_API_KEY
response:
body:
string: !!binary |

View File

@@ -8,6 +8,13 @@ import pytest
from gamestonk_terminal.cryptocurrency.onchain import ethplorer_model
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_query_parameters": [("apiKey", "MOCK_API_KEY")],
}
@pytest.mark.vcr
@pytest.mark.parametrize(
"func, kwargs",

View File

@@ -7,6 +7,13 @@ import pytest
from gamestonk_terminal.cryptocurrency.onchain import ethplorer_view
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_query_parameters": [("apiKey", "MOCK_API_KEY")],
}
@pytest.mark.vcr
@pytest.mark.parametrize(
"func, kwargs",