Skip to content

Commit

Permalink
feat: Use environment variable for API key
Browse files Browse the repository at this point in the history
  • Loading branch information
fleimgruber committed Aug 8, 2022
1 parent 97cd757 commit 3d3530c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions tests/test_pandas.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
from itertools import product
import os

from dotenv import load_dotenv
from entsoe import EntsoePandasClient
import pandas as pd
import pytest

from settings import api_key
load_dotenv()

API_KEY = os.getenv("API_KEY")


@pytest.fixture
def client():
yield EntsoePandasClient(api_key=api_key)
yield EntsoePandasClient(api_key=API_KEY)


@pytest.fixture
Expand Down
8 changes: 6 additions & 2 deletions tests/test_raw.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
from itertools import product
import os

from bs4 import BeautifulSoup
from dotenv import load_dotenv
from entsoe import EntsoeRawClient
from entsoe.exceptions import PaginationError
import pandas as pd
import pytest

from settings import api_key
load_dotenv()

API_KEY = os.getenv("API_KEY")


@pytest.fixture
def client():
yield EntsoeRawClient(api_key=api_key)
yield EntsoeRawClient(api_key=API_KEY)


def valid_xml(s: str) -> bool:
Expand Down

0 comments on commit 3d3530c

Please sign in to comment.