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)
|
|
|
|
|
|
2026-11-28 03:08:55 +01:00
|
|
|
assert result.startswith("<ReplaySimulation(")
|
2021-09-16 11:58:55 +02:00
|
|
|
assert simulation.city.name in result
|
|
|
|
|
assert simulation.strategy in result
|