ibpsa / project1-boptest

Building Optimization Performance Tests
Other
104 stars 69 forks source link

Incorrect check for none in testcase.py #533

Closed dhblum closed 1 year ago

dhblum commented 1 year ago

In testcase.py in /advance in Line https://github.com/ibpsa/project1-boptest/blob/master/testcase.py#L279, the second check (and u[key]) was originally implemented to check for an input value of None. This is because Flask sends the value of inputs that are not specified by the user as None. This also works if the value is of type string, which the Flask API set up in api.py provides. However, if the value is of type float, as in the case of the BOPTEST-Service API and when using the json attribute of python requests from a client, and = 0, then this will cause the check to fail and the value will not be included in the overwriting.

Related to https://github.com/ibpsa/project1-boptest/issues/528 and https://github.com/ibpsa/project1-boptest/issues/532.

FYI @kbenne

dhblum commented 1 year ago

Closed by https://github.com/ibpsa/project1-boptest/pull/544.