-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adapt to sqlachemy 2 #172
base: main
Are you sure you want to change the base?
Adapt to sqlachemy 2 #172
Conversation
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
self.database = DataBase(config) | ||
|
||
def test_sql_db_available(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
assert self.di.check_sql_available() == True | ||
|
||
def test_get_prediction_jobs(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
assert isinstance(response[0], PredictionJobDataClass) | ||
|
||
def test_get_pids_for_api_key(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
assert isinstance(response, list) | ||
|
||
def test_get_ean_for_pid(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
assert isinstance(response, list) | ||
|
||
def test_add_quantiles_to_prediction_jobs(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
assert hasattr(response, "quantiles") | ||
|
||
def test_get_systems_near_location(self): | ||
|
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.
[blackfmt] reported by reviewdog 🐶
Signed-off-by: fortinmax <maxime.fortin@rte-france.com>
SQL Achemy 2.0 introduces a new way of sending requests.
With this PR, every Openstef-dbc SQL queries have been adapted to this new syntax.
Additionally, integration tests are proposed. for each "get" method using SQL queries.