Skip to content

Commit be79157

Browse files
committed
Bug fix
1 parent b68b404 commit be79157

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

rocketpy/motors/motor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ def load_from_thrustcurve_api(name: str, **kwargs):
20102010
If a network or HTTP error occurs during the API call.
20112011
"""
20122012

2013-
data_base64 = GenericMotor.call_thrustcurve_api(name)
2013+
data_base64 = GenericMotor._call_thrustcurve_api(name)
20142014
data_bytes = base64.b64decode(data_base64)
20152015

20162016
# Step 3. Create the motor from the .eng file

tests/unit/motors/test_genericmotor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def _get(url, **_kwargs):
257257
"chamber_position": 0,
258258
}
259259

260+
260261
def assert_motor_specs(motor):
261262
specs = EXPECTED_MOTOR_SPECS
262263
assert motor.burn_time == specs["burn_time"]
@@ -267,9 +268,13 @@ def assert_motor_specs(motor):
267268
assert motor.chamber_position == specs["chamber_position"]
268269
assert motor.average_thrust == pytest.approx(specs["average_thrust"])
269270
assert motor.total_impulse == pytest.approx(specs["total_impulse"])
270-
assert motor.exhaust_velocity.average(*specs["burn_time"]) == pytest.approx(specs["exhaust_velocity"])
271+
assert motor.exhaust_velocity.average(*specs["burn_time"]) == pytest.approx(
272+
specs["exhaust_velocity"]
273+
)
271274
assert motor.max_thrust == pytest.approx(specs["max_thrust"])
272275
assert motor.nozzle_radius == pytest.approx(specs["nozzle_radius"])
276+
277+
273278
def test_load_from_thrustcurve_api(monkeypatch, generic_motor):
274279
"""Tests GenericMotor.load_from_thrustcurve_api with mocked API."""
275280

0 commit comments

Comments
 (0)