2021-09-16 11:58:55 +02:00
|
|
|
"""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(")
|
2026-12-01 22:34:16 +01:00
|
|
|
assert f"city #{simulation.city_id}" in result
|
2021-09-16 11:58:55 +02:00
|
|
|
assert simulation.strategy in result
|