Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TOAR-II FastAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
toar-data
TOAR-II FastAPI
Commits
934e8e26
Commit
934e8e26
authored
4 years ago
by
Sabine Schröder
Browse files
Options
Downloads
Patches
Plain Diff
#10
: operational system using toaruser, pytests using toaradmin
parent
9a9db3f5
No related branches found
No related tags found
No related merge requests found
Pipeline
#40125
passed
4 years ago
Stage: deploy
Stage: pages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
toardb/test_base.py
+1
-1
1 addition, 1 deletion
toardb/test_base.py
toardb/utils/database.py
+1
-1
1 addition, 1 deletion
toardb/utils/database.py
with
2 additions
and
2 deletions
toardb/test_base.py
+
1
−
1
View file @
934e8e26
...
...
@@ -10,7 +10,7 @@ from toardb.base import Base
from
toardb.toardb
import
app
from
toardb.utils.database
import
DATABASE_URL
,
get_db
,
get_engine
url
=
str
(
DATABASE_URL
+
"
_test
"
)
url
=
"
postgresql://toaradmin:toar2@localhost:5432/toardb
_test
"
_db_conn
=
create_engine
(
url
)
def
get_test_engine
()
->
Engine
:
...
...
This diff is collapsed.
Click to expand it.
toardb/utils/database.py
+
1
−
1
View file @
934e8e26
...
...
@@ -5,7 +5,7 @@ Database connection
from
sqlalchemy
import
create_engine
from
sqlalchemy.orm
import
sessionmaker
DATABASE_URL
=
"
postgresql://toar
admin
:toar2@localhost:5432/toardb
"
DATABASE_URL
=
"
postgresql://toar
user
:toar2@localhost:5432/toardb
"
engine
=
create_engine
(
DATABASE_URL
)
ToarDbSession
=
sessionmaker
(
autocommit
=
False
,
autoflush
=
False
,
bind
=
engine
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment