Reputation: 2238
I am used to mocking most boto3 functionalities with moto.
Recently, I encountered awswrangler to query athena and get the result as a nice pandas dataframe.
wondering if there is a way to mock the functionality?
Upvotes: 0
Views: 1476
Reputation: 1
you can use from moto import mock_athena
from moto import mock_athena
class Test:
@mock_athena
def test_athena(self):
pass
#OR you can use this ,this is more useful
class Test(unittest.TestCase):
athena_service = mock_athena()
def setUp(self):
athena_service.start()
def tearDown(self):
athena_service.stop()
def test(self):
client = boto3.client('athena')
#whatever you want to test in athena
Upvotes: 0