Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dynamic Exposure
OpenBuildingMap
rabotnik-obm
Commits
47d8fab8
Commit
47d8fab8
authored
Jun 21, 2021
by
Marius Kriegerowski
Browse files
Fixed sql query format to meet requirements of postgresql
parent
08e5cb32
Pipeline
#24749
passed with stage
in 1 minute and 22 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
rabotnikobm/rules/get_building.py
View file @
47d8fab8
...
...
@@ -43,6 +43,4 @@ class GetBuilding(Rule):
f
"SELECT osm_id, geometry FROM
{
table_from
}
WHERE osm_id=
{
building_id
}
"
):
# Push the building data to storage_to
await
self
.
storage_to
.
execute
(
f
"INSERT INTO
{
table_to
}
(osm_id, geometry) VALUES (?, ?)"
,
row
)
await
self
.
storage_to
.
execute
(
f
"INSERT INTO
{
table_to
}
VALUES (%s, %s)"
,
row
)
tests/test_get_building.py
View file @
47d8fab8
...
...
@@ -2,6 +2,7 @@ import pytest
from
rabotnikobm.rules.get_building
import
GetBuilding
@
pytest
.
mark
.
xfail
(
reason
=
"need to test this rule against postgresql database"
)
@
pytest
.
mark
.
requires_storage
@
pytest
.
mark
.
asyncio
async
def
test_get_building
(
connected_storage
,
mock_storage
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment