-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
24 lähtötietoihin valmiiksi hallinnolliset rajat #307
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "24-l\u00E4ht\u00F6tietoihin-valmiiksi-hallinnolliset-rajat"
Conversation
…thub.com:GispoCoding/hame-ryhti into 24-lähtötietoihin-valmiiksi-hallinnolliset-rajat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just some minor changes!
@Rikuoja Declaring geom field as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One test question.
"SELECT count(*) FROM codes.administrative_region WHERE geom IS NULL" | ||
) | ||
geom_count = cur.fetchone()[0] | ||
assert geom_count == 19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msorvoja Here I'm wondering about this test, it doesn't seem to work. Here we test that geom is NULL in all the 19 rows, it should be NOT NULL I think?
Also, when running the test, my call responds with
{'statusCode': 200, 'body': '"0 inserted or updated. 0 deleted."'}
so it looks here we are testing that the code does NOT fill any geometries.
Fix #24
Still missing tests.
@Rikuoja One test fails since the revision file has been edited by hand. This is because alembic overwrites an optional field containing geometry to
nullable=False
. That won't do since the code list containing the names of the administrative regions must be loaded into the administrative_region code table before the geometries can be inserted. Hence, the geometry field is momentarily filled with NULL values.