18 lines
417 B
Python
18 lines
417 B
Python
import json
|
|
from pathlib import Path
|
|
|
|
from gismeteo.api import WeatherResponse
|
|
|
|
|
|
class MockData:
|
|
|
|
def get_html(self, key: str) -> str:
|
|
return (Path(__file__).parent / f"data/{key}.html").read_text()
|
|
|
|
def get_response(self, key: str) -> WeatherResponse:
|
|
data = json.loads((Path(__file__).parent / f"data/{key}.json").read_text())
|
|
return WeatherResponse(**data)
|
|
|
|
|
|
MOCK_DATA = MockData()
|