| 1 |
import unittest |
| 2 |
|
| 3 |
from nsw_fuel import FuelCheckClient |
| 4 |
|
| 5 |
|
| 6 |
class FuelCheckClientIntegrationTest(unittest.TestCase): |
| 7 |
def setUp(self): |
| 8 |
self.client = FuelCheckClient() |
| 9 |
|
| 10 |
def test_get_reference_data(self) -> None: |
| 11 |
response = self.client.get_reference_data() |
| 12 |
self.assertGreater(len(response.stations), 1500) |
| 13 |
|
| 14 |
def test_get_fuel_prices(self) -> None: |
| 15 |
response = self.client.get_fuel_prices() |
| 16 |
self.assertGreater(len(response.stations), 1500) |
| 17 |
self.assertGreater(len(response.prices), 1500) |
| 18 |
|
| 19 |
def test_get_fuel_prices_for_station(self) -> None: |
| 20 |
response = self.client.get_reference_data() |
| 21 |
station_id = response.stations[0].code |
| 22 |
|
| 23 |
response = self.client.get_fuel_prices_for_station(station_id) |
| 24 |
self.assertGreaterEqual(len(response), 1) |