-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from cloudblue/LITE-create-entity-api-represen…
…tation-for-configuration-object LITE-27890 Add entity api representation to configuration objects
- Loading branch information
Showing
6 changed files
with
145 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from connect_ext_ppr.db import get_db, get_db_ctx_manager, VerboseBaseSession | ||
|
||
|
||
def test_get_db(engine): | ||
db = next(get_db(engine)) | ||
assert isinstance(db, VerboseBaseSession) | ||
assert db.connection().connect() | ||
|
||
|
||
def test_get_db_ctx_manager(mocker, engine): | ||
mocker.patch( | ||
'connect_ext_ppr.db.get_engine', | ||
return_value=engine, | ||
) | ||
with get_db_ctx_manager({}) as db: | ||
assert isinstance(db, VerboseBaseSession) | ||
assert db.connection().connect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters