Skip to content

Commit 4b4c274

Browse files
committed
Centralize definition of test server normal user key
1 parent 5a86909 commit 4b4c274

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

openml/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
OPENML_CACHE_DIR_ENV_VAR = "OPENML_CACHE_DIR"
2626
OPENML_SKIP_PARQUET_ENV_VAR = "OPENML_SKIP_PARQUET"
27+
_TEST_SERVER_NORMAL_USER_KEY = "normaluser"
2728

2829

2930
class _Config(TypedDict):
@@ -212,7 +213,7 @@ class ConfigurationForExamples:
212213
_last_used_key = None
213214
_start_last_called = False
214215
_test_server = "https://test.openml.org/api/v1/xml"
215-
_test_apikey = "normaluser"
216+
_test_apikey = _TEST_SERVER_NORMAL_USER_KEY
216217

217218
@classmethod
218219
def start_using_configuration_for_example(cls) -> None:

openml/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TestBase(unittest.TestCase):
4949
flow_name_tracker: ClassVar[list[str]] = []
5050
test_server = "https://test.openml.org/api/v1/xml"
5151
admin_key = "abc"
52-
user_key = "normaluser"
52+
user_key = openml.config._TEST_SERVER_NORMAL_USER_KEY
5353

5454
# creating logger for tracking files uploaded to test server
5555
logger = logging.getLogger("unit_tests_published_entities")

0 commit comments

Comments
 (0)