File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ # config.yml
2+ trees :
3+ - path : /
4+ tree : tiled.examples.generated_minimal:tree
5+ uvicorn :
6+ host : 0.0.0.0
7+ port : 8000
8+ authentication :
9+ providers :
10+ - provider : test
11+ authenticator : tiled.authenticators:DictionaryAuthenticator
12+ args :
13+ users_to_passwords :
14+ alice : PASSWORD
15+ secret_keys :
16+ - SECRET
Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+
3+ import numpy
4+ import yaml
5+
6+ from tiled ._tests .utils import enter_username_password
7+ from tiled .client import Context , from_context
8+ from tiled .server .app import build_app_from_config
9+
10+ CONFIG_NAME = "in_memory_db.yml"
11+ CATALOG_STORAGE = "data/"
12+
13+ here = Path (__file__ ).parent .absolute ()
14+
15+ def test_good_path ():
16+ """Test authn database defaults to in-memory catalog"""
17+ with open (here / "test_configs" / "config_in_memory_authn.yml" ) as config_file :
18+ config = yaml .load (config_file , Loader = yaml .BaseLoader )
19+
20+ app = build_app_from_config (config )
21+ context = Context .from_app (app )
22+
23+ with enter_username_password ("alice" , "PASSWORD" ):
24+ client = from_context (context , remember_me = False )
25+
26+ client .logout ()
27+ context .close ()
28+
29+ assert True
You can’t perform that action at this time.
0 commit comments