velofy/tests/db/replay/test_simulations.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
602 B
Python
Raw Permalink Normal View History

"""Test the ORM's `ReplaySimulation` model."""
class TestSpecialMethods:
"""Test special methods in `ReplaySimulation`."""
def test_create_simulation(self, simulation):
"""Test instantiation of a new `ReplaySimulation` object."""
assert simulation is not None
def test_text_representation(self, simulation):
"""`ReplaySimulation` has a non-literal text representation."""
result = repr(simulation)
assert result.startswith("<ReplaySimulation(")
assert f"city #{simulation.city_id}" in result
assert simulation.strategy in result