Skip to content

Commit

Permalink
fix(test): ``gas_prices typo
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryVasanth committed Jun 4, 2024
1 parent 160f9c5 commit ca36ac6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_update_gas_prices.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import unittest
from unittest.mock import patch, mock_open
import json
from update_gas_price import update_gas_price
from update_gas_prices import update_gas_prices


class TestUpdateGasPrice(unittest.TestCase):

@patch("update_gas_price.retrieve_newest_pdf_gas_info")
@patch("update_gas_prices.retrieve_newest_pdf_gas_info")
@patch(
"update_gas_price.open",
"update_gas_prices.open",
new_callable=mock_open,
read_data='{"current": {"Start date": "2024-05-20", "End date": "2024-05-26"}}',
)
def test_update_gas_price(self, mock_file, mock_retrieve_info):
def test_update_gas_prices(self, mock_file, mock_retrieve_info):
# Mock gas info
mock_retrieve_info.return_value = {
"gas_info": {
Expand All @@ -25,7 +25,7 @@ def test_update_gas_price(self, mock_file, mock_retrieve_info):
}

# Call function
update_gas_price()
update_gas_prices()

# Assert the file was opened and written
mock_file.assert_called_with("gas_info.json", "w")
Expand Down

0 comments on commit ca36ac6

Please sign in to comment.