-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic integration testing for custom endpoints
- Loading branch information
1 parent
9aa2f86
commit 92254e1
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import copy | ||
import os | ||
import time | ||
import unittest | ||
|
||
import dotenv | ||
|
||
from dune_client.client import DuneClient | ||
|
||
dotenv.load_dotenv() | ||
|
||
|
||
class TestCustomEndpoints(unittest.TestCase): | ||
def setUp(self) -> None: | ||
self.valid_api_key = os.environ["DUNE_API_KEY"] | ||
|
||
def test_get_execution_status(self): | ||
dune = DuneClient(self.valid_api_key) | ||
results = dune.get_custom_endpoint_result("dune", "new-test") | ||
self.assertEqual(len(results.get_rows()), 10) | ||
self.assertEqual(len(results.get_columns()), 5) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |