File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -50,22 +50,13 @@ def base_settings_configurator(settings):
50
50
@pytest_asyncio .fixture (scope = "function" )
51
51
async def app_client (event_loop , db , request ):
52
52
globalregistry .reset ()
53
- app = make_app (settings = get_db_settings_volto (request .node ), loop = event_loop )
53
+ app = make_app (settings = get_db_settings (request .node ), loop = event_loop )
54
54
async with TestClient (app , timeout = 90 ) as client :
55
55
await _clear_dbs (app .app .root )
56
56
yield app , client
57
57
clear_task_vars ()
58
58
59
59
60
- def get_db_settings_volto (node ):
61
- db_settings = get_db_settings (node )
62
- print (db_settings )
63
- db_settings ["storages" ]["db" ] = {"dsn" : {"storage" : "postgresql" , "password" : "postgres" , "scheme" : "postgres" }}
64
- db_settings ["databases" ]["db" ]["dsn" ]["password" ] = "postgres"
65
- db_settings ["databases" ]["db-custom" ]["dsn" ]["password" ] = "postgres"
66
- return db_settings
67
-
68
-
69
60
class GuillotinaVoltoDBAsgiRequester (GuillotinaDBAsgiRequester ):
70
61
def __init__ (self , client ):
71
62
self .client = client
Original file line number Diff line number Diff line change 1
1
import pytest
2
+ from guillotina .tests .test_catalog import NOT_POSTGRES
2
3
3
4
4
5
pytestmark = pytest .mark .asyncio
@@ -14,6 +15,7 @@ async def test_component(cms_requester):
14
15
assert len (response ["@components" ]["actions" ]["object" ]) > 0
15
16
16
17
18
+ @pytest .mark .skipif (NOT_POSTGRES , reason = "Only PG" )
17
19
async def test_get_database (cms_requester ):
18
20
response , status = await cms_requester ("GET" , "/db/guillotina/@database" )
19
21
assert status == 200
You can’t perform that action at this time.
0 commit comments